:root {
  /* ============================================================
     Brandbook palette — exact hex from the brand guide
       Grey            #95A6B5   CMYK 18 9 0 29
       White           #FFFFFF   CMYK 0 0 0 0
       Black           #292D30   CMYK 14 6 0 81
       Gray optional 1 #545F69   CMYK 20 10 0 59
       Gray optional 2 #8696A4   CMYK 18 9 0 36
       Gray optional 3 #95A6B6   CMYK 18 9 0 29
       Green (light)   #C1F091
       Mint / teal     #4DEDC1
       Color gradient  #C1F091 -> #4DEDC1
     ============================================================ */
  --brand-grey:   #95a6b5;
  --brand-black:  #292d30;
  --brand-white:  #ffffff;
  --brand-gray-1: #545f69;
  --brand-gray-2: #8696a4;
  --brand-gray-3: #95a6b6;
  --brand-green:  #c1f091;
  --brand-mint:   #4dedc1;

  --bg: #ffffff;
  --bg-soft: #f3f5f8;
  --bg-slate: var(--brand-grey);          /* #95A6B5 */
  --bg-slate-dark: var(--brand-gray-1);    /* #545F69 */
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --ink: var(--brand-black);               /* #292D30 */
  --ink-2: var(--brand-gray-1);            /* #545F69 */
  --ink-3: var(--brand-gray-2);            /* #8696A4 */
  --line: #e3e8ee;
  --line-soft: #eef2f6;
  --primary: var(--brand-black);           /* #292D30 */
  --primary-ink: #ffffff;
  --primary-soft: #e9edf2;
  --primary-hover: #3a4248;
  --accent: var(--brand-mint);             /* #4DEDC1 */
  --accent-2: #2ec9a6;                     /* darker mint, for hover */
  --accent-soft: #ddf7ef;
  --accent-ink: #0d4d3e;
  --warn: #c97a3b;
  --sand: #f0e6d6;
  --shadow-sm: 0 1px 2px rgba(15,23,34,.06);
  --shadow-md: 0 8px 24px -12px rgba(15,23,34,.16);
  --shadow-lg: 0 24px 60px -28px rgba(15,23,34,.28);
  --shadow-mint: 0 12px 32px -10px rgba(77,237,193,.5);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;
  --font-sans: "Manrope", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Manrope", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --scale: 1;

  /* Brandbook color gradient: green -> mint */
  --grad-mint: linear-gradient(135deg, #c1f091 0%, #4dedc1 100%);
  --grad-mint-soft: linear-gradient(135deg, #eaf7d9, #e6fbf3);
  --grad-slate: linear-gradient(180deg, #95a6b5 0%, #8696a4 100%);
}

/* Theme variants */
:root[data-theme="slate"] {
  --primary: var(--brand-black);
  --accent: var(--brand-mint);
}
:root[data-theme="mint"] {
  --primary: #2ec9a6;
  --primary-soft: #ddf7ef;
  --primary-hover: #1e9c79;
  --accent: var(--brand-black);
  --accent-soft: #e9edf2;
}
:root[data-theme="slate-dark"] {
  --primary: var(--brand-black);
  --primary-soft: #e9edf2;
  --primary-hover: #3a4248;
  --accent: var(--brand-mint);
}

* { box-sizing: border-box; }

/* Clip stray horizontal overflow (decorative absolutely-positioned art with
   negative offsets) so the mobile viewport never widens — otherwise every
   position:fixed; width:100% element (bottom bar, form modal) spills off-screen. */
html { overflow-x: hidden; }

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  font-size: calc(17px * var(--scale));
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
  font-weight: 800;
}

p { margin: 0; text-wrap: pretty; }
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }

/* Layout */
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: calc(15px * var(--scale));
  line-height: 1;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease, color .15s ease;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.btn-primary {
  background: var(--primary);
  color: var(--primary-ink);
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.btn-mint {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-mint);
}
.btn-mint:hover { background: var(--accent-2); transform: translateY(-1px); color: #fff; }
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-secondary:hover { border-color: var(--ink); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  padding: 12px 16px;
}
.btn-ghost:hover { background: var(--bg-soft); }
.btn-large {
  padding: 20px 32px;
  font-size: calc(16px * var(--scale));
}
.btn-whatsapp {
  background: #25d366;
  color: #fff;
}
.btn-whatsapp:hover { background: #1eb957; }
/* Text-style link button (used inside cards) — no hover fill, underline instead */
.btn-link { background: transparent; }
.btn-link svg { transition: transform .15s ease; }
.btn-link:hover { background: transparent; transform: none; }
.btn-link:hover span { text-decoration: underline; text-underline-offset: 4px; }
.btn-link:hover svg { transform: translateX(3px); }

/* Pills / chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: calc(13px * var(--scale));
  font-weight: 600;
  letter-spacing: -0.005em;
}
.chip-soft {
  background: var(--surface);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.chip-mint {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.chip-slate {
  background: var(--primary-soft);
  color: var(--primary);
}

/* Section */
section { padding: 96px 0; }
section.tight { padding: 64px 0; }
.eyebrow {
  font-size: calc(12px * var(--scale));
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.eyebrow-slate { color: var(--ink-3); }
.section-head {
  display: grid;
  gap: 18px;
  max-width: 760px;
  margin-bottom: 64px;
}
.section-head h2 {
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.035em;
}
.section-head p {
  font-size: calc(19px * var(--scale));
  color: var(--ink-2);
  line-height: 1.5;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.card:hover {
  border-color: var(--ink);
  box-shadow: var(--shadow-md);
}
.card-soft {
  background: var(--surface-2);
  border-color: var(--line-soft);
}
.card-slate {
  background: var(--bg-slate);
  color: #fff;
  border-color: var(--bg-slate);
}
.card-slate:hover { border-color: var(--bg-slate-dark); }

/* Image placeholder */
.ph {
  position: relative;
  background:
    repeating-linear-gradient(45deg,
      var(--line-soft) 0 14px,
      var(--bg-soft) 14px 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--ink-2);
}
.ph-slate {
  background: var(--grad-slate);
  color: #fff;
  border-color: transparent;
}
.ph-mint {
  background: var(--grad-mint);
  color: #fff;
  border-color: transparent;
}
.ph-label {
  font-family: var(--font-mono);
  font-size: calc(11px * var(--scale));
  background: rgba(255,255,255,.92);
  color: var(--ink);
  padding: 6px 12px;
  border-radius: 999px;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 500;
}

/* Form */
.field {
  display: grid;
  gap: 8px;
  align-content: start;
}
.field label {
  font-size: calc(13px * var(--scale));
  font-weight: 700;
  color: var(--ink-2);
  letter-spacing: .02em;
  text-transform: uppercase;
}
.field .hint {
  font-size: calc(13px * var(--scale));
  color: var(--ink-3);
}
.input, .select, .textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 16px 18px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  font-size: calc(17px * var(--scale));
  color: var(--ink);
  transition: border-color .12s, box-shadow .12s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.textarea { min-height: 120px; resize: vertical; }

/* Compact the request form on small screens so more fits without scrolling */
@media (max-width: 720px) {
  .form-modal > main { padding: 20px 18px !important; min-height: auto !important; }
  .input, .select, .textarea { padding: 12px 14px; font-size: calc(16px * var(--scale)); }
  .textarea { min-height: 92px; }
  .field { gap: 5px; }
  .field label { font-size: calc(12px * var(--scale)); }
  .field .hint { font-size: calc(12px * var(--scale)); }
  .form-modal .row2 { gap: 12px !important; }
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.choice {
  display: grid;
  gap: 8px;
  text-align: left;
  padding: 20px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all .15s;
}
.choice:hover { border-color: var(--ink); }
.choice[data-active="true"] {
  border-color: var(--ink);
  background: var(--accent-soft);
}
.choice .ti { font-weight: 700; font-size: calc(17px * var(--scale)); }
.choice .ds { font-size: calc(14px * var(--scale)); color: var(--ink-3); }

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
}
.toggle-row .lbl { font-weight: 600; font-size: calc(16px * var(--scale)); }
.toggle-row .sub { font-size: calc(13px * var(--scale)); color: var(--ink-3); margin-top: 2px; }
.seg {
  display: inline-flex;
  background: var(--bg-soft);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 2px;
}
.seg button {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: calc(14px * var(--scale));
  font-weight: 600;
  color: var(--ink-2);
}
.seg button[data-active="true"] {
  background: var(--ink);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

/* Accessibility-focused */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Grids */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

@media (max-width: 960px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .wrap { padding: 0 20px; }
  section { padding: 72px 0; }
  .choice-grid { grid-template-columns: 1fr; }
}

/* Wordmark */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: calc(22px * var(--scale));
  color: var(--ink);
}
.wordmark .kranich-text {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
}
.wordmark .kranich-text small {
  font-size: .55em;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-left: 4px;
  transform: translateY(-3px);
}

/* Google Places autocomplete dropdown — must sit above the request modal (z 80) */
.pac-container {
  z-index: 100000;
  font-family: var(--font-sans);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  margin-top: 4px;
}

/* ============================================================
   Floating WhatsApp bubble + mobile sticky CTA bar
   ============================================================ */
.wa-bubble {
  position: fixed; right: 24px; bottom: 24px; z-index: 40;
  width: 60px; height: 60px; border-radius: 999px;
  background: #25d366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 32px -8px rgba(37,211,102,.6);
  transition: transform .15s ease;
}
.wa-bubble:hover { transform: translateY(-2px); }

/* Sticky "Fahrt anfragen" bar — mobile only */
.mobile-cta-bar { display: none; }

@media (max-width: 880px) {
  /* Raise WhatsApp above the sticky bar and enlarge for touch */
  .wa-bubble {
    width: 64px; height: 64px;
    right: 16px; bottom: 88px;
  }
  /* Always-visible request button + WhatsApp, anchored to the bottom.
     width:100vw (not right:0) locks it to the screen width regardless of any
     page-level horizontal overflow / containing-block width. */
  .mobile-cta-bar {
    display: flex; gap: 10px; align-items: center;
    position: fixed; left: 0; right: auto; bottom: 0; z-index: 45;
    width: 100vw; max-width: 100vw;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.92);
    backdrop-filter: saturate(140%) blur(12px);
    border-top: 1px solid var(--line-soft);
  }
  /* CTA takes ~80%, WhatsApp ~20% — they always share the row */
  .mobile-cta-bar .btn {
    flex: 1 1 0; min-width: 0; justify-content: center;
    padding: 14px 16px; font-size: calc(15px * var(--scale));
  }
  /* Circular WhatsApp button next to the CTA (like the reference site) */
  .mobile-cta-bar .wa-btn {
    flex: 0 0 auto; width: 56px; height: 56px; border-radius: 999px;
    align-self: center;
    display: flex; align-items: center; justify-content: center;
    color: #fff; background: #25d366;
    box-shadow: 0 8px 22px -8px rgba(37,211,102,.6);
  }
  .mobile-cta-bar .wa-btn:active { transform: translateY(1px); }
  /* WhatsApp now lives in the bar — hide the floating bubble on mobile */
  .wa-bubble { display: none !important; }
  /* Reserve space so the footer isn't hidden behind the bar */
  body { padding-bottom: 76px; }
}

/* ============================================================
   Legal pages (Impressum / Datenschutz / AGB)
   Standalone static HTML — reuses .wrap, .btn, .wordmark, palette
   ============================================================ */
.legal-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,249,253,.9);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.legal-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
}
.legal-main { padding: 56px 0 80px; }
.legal-main .wrap { max-width: 840px; }
.legal-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800; line-height: 1.05; letter-spacing: -0.035em;
  margin-bottom: 10px;
}
.legal-updated {
  font-family: var(--font-mono);
  font-size: calc(13px * var(--scale));
  color: var(--ink-3);
  margin-bottom: 40px;
}
.legal-body { font-size: calc(16.5px * var(--scale)); color: var(--ink-2); }
.legal-body h2 {
  font-size: calc(24px * var(--scale));
  font-weight: 800; color: var(--ink);
  margin: 44px 0 14px; line-height: 1.2;
}
.legal-body h3 {
  font-size: calc(18px * var(--scale));
  font-weight: 700; color: var(--ink);
  margin: 28px 0 10px;
}
.legal-body p { margin: 0 0 14px; line-height: 1.65; }
.legal-body ul, .legal-body ol { margin: 0 0 16px; padding-left: 22px; line-height: 1.65; }
.legal-body li { margin-bottom: 7px; }
.legal-body a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
.legal-body strong { color: var(--ink); font-weight: 700; }
.legal-body address { font-style: normal; line-height: 1.7; }
.legal-toc {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 26px; margin-bottom: 40px;
}
.legal-toc strong { display: block; margin-bottom: 10px; color: var(--ink); }
.legal-toc ol { margin: 0; padding-left: 20px; }
.legal-toc a { color: var(--ink-2); text-decoration: none; }
.legal-toc a:hover { color: var(--accent-ink); text-decoration: underline; }
.legal-note {
  background: var(--accent-soft); color: var(--accent-ink);
  border-radius: var(--radius-md);
  padding: 16px 20px; margin: 0 0 24px;
  font-size: calc(14.5px * var(--scale));
}
.legal-placeholder {
  background: #fff4e6; color: #8a4b16;
  border: 1px dashed #e0a96d; border-radius: 6px;
  padding: 1px 7px; font-family: var(--font-mono);
  font-size: .9em; font-weight: 500;
}
.legal-footer {
  background: var(--ink); color: #8ea3bd;
  padding: 28px 0; font-size: calc(13px * var(--scale));
}
.legal-footer .wrap {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.legal-footer a { color: #cdd9eb; }
@media (max-width: 640px) {
  .legal-header .wrap { padding: 14px 16px; gap: 10px; }
  /* "KRANKENTRANSPORT" subtitle eats the row width — drop it on small screens */
  .legal-header .kranich-text small { display: none; }
  .legal-header .wordmark { font-size: 18px !important; min-width: 0; }
  .legal-header .btn {
    padding: 9px 12px; font-size: 13px; white-space: nowrap; flex-shrink: 0;
  }
}

/* Heart-rest accent (from brandbook 'Heartrest Usage') — small mint dot on text */
.heart-rest::after {
  content: "";
  display: inline-block;
  width: .35em;
  height: .35em;
  background: var(--accent);
  border-radius: 50%;
  margin-left: .12em;
  vertical-align: .5em;
}
