/* ============================================================
   TOKENS
   --navy-brand / --on-navy: FIXED pair — always a dark navy
   block with light text, in both themes, on purpose (about
   card, contact panel). Never remapped by dark mode, so the
   background/text contrast inside them can never invert.
   Everything else (page bg, card bg, ink, headings, lines)
   is a theme-aware token pair, redefined together below so a
   background and its text always change side by side.
   ============================================================ */
:root {
  --navy-brand: #0B2545;
  --on-navy: #EAF1F8;
  --on-navy-soft: #C9DAE7;

  --blue-600: #1E5FA8;
  --blue-500: #2E77C9;
  --green-500: #5FA83D;
  --green-400: #7FC24E;

  --bg: #FBF6EC;
  --paper: #FFFFFF;
  --mist: #F3ECDD;
  --ink: #1B2A22;
  --ink-soft: #5B6B60;
  --ink-heading: #0B2545;
  --line: #E7DEC9;
  --link: #1E5FA8;
  --radius-card: 22px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15130E;
    --paper: #201C15;
    --mist: #262019;
    --ink: #EFE9DC;
    --ink-soft: #BFB6A0;
    --ink-heading: #F6F1E4;
    --line: #3B3527;
    --link: #7FB2E8;
  }
}
:root[data-theme="dark"] {
  --bg: #15130E;
  --paper: #201C15;
  --mist: #262019;
  --ink: #EFE9DC;
  --ink-soft: #BFB6A0;
  --ink-heading: #F6F1E4;
  --line: #3B3527;
  --link: #7FB2E8;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  /* iOS Safari skaliert Schrift im Querformat sonst eigenmaechtig hoch und die
     Seite sieht auf dem Handy anders aus als im Entwurf. */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  color: var(--ink-heading);
  font-weight: 600;
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.01em;
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; }
@media (min-width: 640px) { .wrap { padding: 0 32px; } }
.overflow-safe { overflow-x: auto; }
.scroll-anchor { scroll-margin-top: 84px; }

/* ---------- NAV ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Deckende Rueckfalloption zuerst: aeltere Mobilbrowser kennen color-mix()
     nicht und wuerden sonst eine durchsichtige Kopfzeile zeigen. */
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  max-width: 1180px;
  margin: 0 auto;
  gap: 14px;
}
@media (min-width: 640px) { .nav-row { padding: 14px 32px; } }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { height: 34px; width: auto; border-radius: 6px; flex: none; }
.brand-name { font-family: "Fraunces", serif; font-weight: 600; font-size: 1.02rem; color: var(--ink-heading); white-space: nowrap; }

nav.links {
  display: none;
  gap: 6px;
  font-size: 0.94rem;
  font-weight: 500;
}
nav.links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  white-space: nowrap;
}
nav.links a:hover { color: var(--ink-heading); background: var(--mist); }
/* --link ist themeabhaengig; --navy-brand waere im Dunkelmodus dunkel auf dunkel. */
nav.links a.active {
  color: var(--link);
  background: var(--mist);
  background: color-mix(in srgb, var(--link) 14%, transparent);
}
/* Erst ab 920px ist Platz fuer Logo + fuenf Links + Telefonnummer + Button.
   Darunter wuerden die Links umbrechen oder die Zeile seitlich ueberlaufen. */
@media (min-width: 920px) { nav.links { display: flex; } }

.nav-cta { display: flex; align-items: center; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px;
  font-weight: 600; font-size: 0.9rem;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue-600), var(--green-500));
  color: #fff;
  box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--blue-600) 55%, transparent);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -6px color-mix(in srgb, var(--blue-600) 60%, transparent); }
.btn-ghost { border-color: var(--line); color: var(--ink-heading); background: var(--paper); }
.btn-ghost:hover { border-color: var(--blue-500); color: var(--blue-600); }
/* Auf schmalen Handys passen Logo, Angebots-Button und Menue-Taste nicht in eine
   Zeile. Der Button entfaellt deshalb dort und steht stattdessen im Mobilmenue. */
.nav-cta .btn-primary { display: none; }
@media (min-width: 560px) { .nav-cta .btn-primary { display: inline-flex; } }
.phone-mini { display: none; font-size: 0.85rem; color: var(--ink-soft); font-weight: 500; }
@media (min-width: 1040px) { .phone-mini { display: block; } }

/* mobile menu toggle — labelled, high-contrast in both themes.
   Die Checkbox wird nur optisch versteckt, nicht mit display:none: sonst ist
   sie nicht fokussierbar und das Menue laesst sich nicht per Tastatur oeffnen. */
.nav-toggle-input {
  position: absolute;
  width: 1px; height: 1px;
  margin: 0; padding: 0; border: 0;
  opacity: 0;
  clip-path: inset(50%);
  pointer-events: none;
}
.nav-toggle-label {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px 9px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-heading);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  flex: none;
}
.nav-toggle-label svg { stroke: var(--ink-heading); }
/* Fokus- und Offen-Zustand liegen an der Checkbox, sichtbar wird die Taste. */
.nav-toggle-input:focus-visible ~ .nav-row .nav-toggle-label {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
}
.nav-toggle-input:checked ~ .nav-row .nav-toggle-label {
  border-color: var(--blue-500);
  color: var(--link);
}
.nav-toggle-input:checked ~ .nav-row .nav-toggle-label svg { stroke: var(--link); }
@media (min-width: 920px) { .nav-toggle-label { display: none; } }
.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 6px 22px 18px;
  padding-bottom: max(18px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--bg);
  /* Im Querformat ist das Menue hoeher als der Bildschirm — dann scrollen. */
  max-height: calc(100vh - 62px);
  max-height: calc(100dvh - 62px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.mobile-menu a {
  padding: 14px 4px;
  font-size: 1.04rem;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.mobile-menu a:last-child { border-bottom: none; }
/* Der Angebots-Button aus der Kopfzeile wandert auf dem Handy hierher. */
.mobile-menu .mobile-menu-cta {
  margin-top: 14px;
  border-bottom: none;
  justify-content: center;
  padding: 13px 20px;
  font-size: 0.95rem;
  color: #fff;
}
.nav-toggle-input:checked ~ .mobile-menu { display: flex; }
@media (min-width: 920px) { .mobile-menu { display: none !important; } }

/* ---------- HERO ---------- */
.hero { position: relative; overflow: hidden; padding: 44px 0 68px; }
@media (min-width: 880px) { .hero { padding: 72px 0 92px; } }
.hero-blob {
  position: absolute; top: -120px; left: -160px;
  width: 460px; height: 460px;
  background: radial-gradient(circle, color-mix(in srgb, var(--green-500) 20%, transparent), transparent 70%);
  z-index: 0; pointer-events: none;
}
.hero-grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center;
}
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 56px; } }
.eyebrow-plain { color: var(--green-500); font-weight: 700; font-size: 0.92rem; margin-bottom: 16px; letter-spacing: 0.01em; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.4rem); max-width: 14ch; }
.hero-sub { margin-top: 20px; font-size: 1.06rem; color: var(--ink-soft); max-width: 46ch; }
.hero-actions { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }

.hero-photo-wrap { position: relative; max-width: 400px; margin: 0 auto; }
.hero-photo-frame {
  position: relative; border-radius: 32px 32px 32px 8px; overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: 0 30px 60px -24px rgba(11,37,69,0.35);
}
.hero-photo-frame img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%;
  transition: transform 0.5s ease;
}
.hero-photo-wrap:hover .hero-photo-frame img { transform: scale(1.04); }
.hero-photo-frame::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(200deg, transparent 55%, rgba(11,37,69,0.35));
}
.hero-badge {
  position: absolute; left: -14px; bottom: 24px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px; padding: 15px 18px;
  box-shadow: 0 18px 34px -16px rgba(11,37,69,0.28);
  display: flex; align-items: center; gap: 12px; max-width: 220px;
}
@media (max-width: 420px) { .hero-badge { left: 6px; } }
.hero-badge .dot {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-600), var(--green-500));
  display: flex; align-items: center; justify-content: center; flex: none;
}
.hero-badge strong { display: block; font-size: 0.93rem; color: var(--ink-heading); }
.hero-badge span { font-size: 0.8rem; color: var(--ink-soft); }
.hero-dots {
  position: absolute; top: -20px; right: -20px; width: 84px; height: 84px;
  background-image: radial-gradient(var(--green-500) 3px, transparent 3px);
  background-size: 14px 14px; opacity: 0.45; z-index: -1;
}

/* ---------- SECTION SHELL ---------- */
section { padding: 56px 0; }
@media (min-width: 880px) { section { padding: 84px 0; } }
.section-mist { background: var(--mist); }
.section-head { max-width: 62ch; margin-bottom: 36px; }
@media (min-width: 880px) { .section-head { margin-bottom: 46px; } }
.section-head h2 { font-size: clamp(1.65rem, 4.4vw, 2.4rem); }
.section-head p { margin-top: 14px; color: var(--ink-soft); font-size: 1.02rem; }

/* ---------- SERVICES ---------- */
.service-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 640px) { .service-grid { grid-template-columns: 1fr 1fr; gap: 24px; } }
.service-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-card); overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -22px rgba(11,37,69,0.25); }
.service-photo { position: relative; aspect-ratio: 16 / 11; overflow: hidden; }
.service-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.service-card:hover .service-photo img { transform: scale(1.06); }
/* Ohne das ueberlappende Icon braucht der Textblock oben keinen Freiraum mehr. */
.service-body { padding: 24px 22px 26px; }
@media (min-width: 640px) { .service-body { padding: 26px 24px 28px; } }
.service-card h3 { font-size: 1.18rem; margin-bottom: 10px; }
.service-card p { color: var(--ink-soft); font-size: 0.96rem; }

/* ---------- WHY ---------- */
.why-grid { display: grid; grid-template-columns: 1fr; gap: 22px; }
@media (min-width: 620px) { .why-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .why-grid { grid-template-columns: repeat(4, 1fr); } }
.why-item {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 18px; padding: 22px;
}
.why-item svg { flex: none; margin-top: 2px; }
.why-item h4 { font-family: "Inter"; font-weight: 600; font-size: 0.98rem; color: var(--ink-heading); margin-bottom: 4px; }
.why-item p { font-size: 0.89rem; color: var(--ink-soft); }

/* ---------- ABOUT (fixed navy block — never inverted) ---------- */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 34px; align-items: center; }
@media (min-width: 880px) { .about-grid { grid-template-columns: 0.85fr 1.15fr; gap: 56px; } }
.about-card {
  border-radius: 26px; padding: 28px 24px;
  background: var(--navy-brand); color: var(--on-navy);
  position: relative; overflow: hidden;
}
@media (min-width: 640px) { .about-card { padding: 36px; } }
.about-card::after {
  content: ""; position: absolute; width: 240px; height: 240px;
  right: -70px; bottom: -80px;
  background: radial-gradient(circle, color-mix(in srgb, var(--green-500) 45%, transparent), transparent 70%);
}
.about-card-inner { position: relative; z-index: 1; }
.about-role { color: #9FD37B; font-size: 0.86rem; font-weight: 600; margin-bottom: 6px; }
.about-name { font-family: "Fraunces", serif; font-size: 1.4rem; color: #fff; margin-bottom: 14px; }
.about-card p.about-text { color: var(--on-navy-soft); font-size: 0.96rem; }
.about-text-block p { color: var(--ink-soft); font-size: 1.01rem; margin-bottom: 16px; }
.about-text-block p:last-child { margin-bottom: 0; }

/* ---------- CONTACT (fixed navy block — never inverted) ---------- */
.contact-panel {
  position: relative; border-radius: 28px;
  background: var(--navy-brand); color: var(--on-navy);
  padding: 44px 24px; overflow: hidden; text-align: center;
}
@media (min-width: 700px) { .contact-panel { padding: 64px 54px; } }
.contact-swoosh {
  position: absolute; bottom: -160px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 500px; opacity: 0.5; pointer-events: none;
}
.contact-panel-inner { position: relative; z-index: 1; }
.contact-panel h2 { color: #fff; font-size: clamp(1.5rem, 5vw, 2.3rem); max-width: 20ch; margin: 0 auto; }
.contact-panel p.lead { margin-top: 16px; color: var(--on-navy-soft); font-size: 1.01rem; }
.contact-methods { margin-top: 30px; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.contact-chip {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  padding: 13px 20px; border-radius: 999px; font-size: 0.94rem; color: var(--on-navy);
  /* Auf sehr schmalen Handys darf die E-Mail-Adresse nicht aus der Flaeche laufen. */
  max-width: 100%; overflow-wrap: anywhere;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.contact-chip:hover { background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.32); }
.contact-chip svg { flex: none; }

/* ---------- LEGAL (eigene Seiten: Impressum, Datenschutz) ---------- */
.legal { padding-top: 40px; }
.legal-doc { max-width: 74ch; }
.legal-doc h1 { font-size: clamp(1.9rem, 5vw, 2.5rem); }
.legal-intro { margin-top: 14px; color: var(--ink-soft); font-size: 1.02rem; }
.legal-block { margin-top: 36px; }
.legal-block h2 { font-size: clamp(1.15rem, 2.8vw, 1.42rem); }
.legal-block h3 { font-size: 1.02rem; margin-top: 24px; }
/* Fliesstext, Listen und Adressbloecke im Rechtstext gleichmaessig abstaenden */
.legal-block > * + * { margin-top: 12px; }
.legal-block ul { margin: 0; padding-left: 20px; }
.legal-block li + li { margin-top: 6px; }
.legal-block a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.legal-block a:hover { color: var(--ink-heading); }
.legal-address { font-style: normal; line-height: 1.75; }
.legal-data { display: grid; grid-template-columns: 1fr; gap: 6px 22px; }
@media (min-width: 640px) { .legal-data { grid-template-columns: max-content 1fr; gap: 8px 22px; } }
.legal-data dt { color: var(--ink-soft); font-size: 0.9rem; }
.legal-data dd { margin: 0; }
.legal-updated { margin-top: 44px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 0.86rem; color: var(--ink-soft); }

/* ---------- FOOTER ---------- */
footer { padding: 32px 0; border-top: 1px solid var(--line); }
.footer-row { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
@media (min-width: 640px) { .footer-row { flex-direction: row; justify-content: space-between; align-items: center; } }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { height: 22px; }
.footer-tag { font-size: 0.81rem; color: var(--ink-soft); }
.footer-links { display: flex; gap: 18px; font-size: 0.81rem; color: var(--ink-soft); flex-wrap: wrap; }
.footer-links a:hover { color: var(--ink-heading); }

:focus-visible { outline: 2px solid var(--blue-600); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .service-card, .service-photo img, .hero-photo-frame img { transition: none; }
}
