/* Base Typography & Layout */
:root {
  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif;
  --color-text: #1a1a1a;
  --color-bg: #ffffff;
  --color-muted: #555;
  --color-accent: #0a5cc0;
  --color-accent-hover: #084f9f;
  --color-border: #e2e2e2;
  --color-focus: #ff9800;
  --space-1: 0.25rem; /* 4px */
  --space-2: 0.5rem;  /* 8px */
  --space-3: 0.75rem; /* 12px */
  --space-4: 1rem;    /* 16px */
  --space-5: 1.5rem;  /* 24px */
  --space-6: 2rem;    /* 32px */
  --space-7: 3rem;    /* 48px */
  --space-8: 4rem;    /* 64px */
  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 6px rgba(0,0,0,0.08);
  --line-max: 70ch;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-stack);
  font-size: 16px;
  line-height: 1.5;
  background: var(--color-bg);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }

.container {
  width: 100%;
  max-width: 70rem;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: var(--space-4);
  top: var(--space-4);
  width: auto;
  height: auto;
  background: #000;
  color: #fff;
  padding: var(--space-2) var(--space-3);
  z-index: 1000;
}

.site-header {
  border-bottom: 1px solid var(--color-border);
  background: #fff;
}
.site-header .brand-link {
  font-weight: 600;
  text-decoration: none;
  color: var(--color-text);
  font-size: 1.05rem;
}
.brand-with-logo { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-2) 0; }
.brand-with-logo .logo { display: block; height: auto; max-height: 48px; width: auto; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; border: 0 !important; }
.nav { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--space-4); }
.nav a {
  text-decoration: none;
  color: var(--color-text);
  padding: var(--space-3) var(--space-2);
  position: relative;
}
.nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 4px; height: 2px;
  background: var(--color-accent);
  border-radius: 1px;
}
.nav a:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }

.hero {
  padding: var(--space-8) 0 var(--space-7);
}
.hero h1 { font-size: clamp(2rem, 6vw, 3rem); line-height: 1.15; margin: 0 0 var(--space-4); max-width: 20ch; }
.hero .lead { font-size: 1.125rem; max-width: 50ch; margin: 0 0 var(--space-5); }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

.btn {
  --btn-bg: var(--color-accent);
  --btn-fg: #fff;
  --btn-bg-hover: var(--color-accent-hover);
  display: inline-block;
  padding: var(--space-3) var(--space-5);
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--radius-md);
  background: var(--btn-bg);
  color: var(--btn-fg);
  box-shadow: var(--shadow-sm);
  transition: background .18s ease, transform .18s ease;
}
.btn:hover { background: var(--btn-bg-hover); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.btn.outline { background: transparent; color: var(--color-accent); border: 2px solid var(--color-accent); }
.btn.outline:hover { background: var(--color-accent); color: #fff; }

.leistungen { padding: var(--space-7) 0; background: #f8fafc; }
.leistungen h2 { margin-top: 0; }
.services-grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fill,minmax(230px,1fr)); margin-top: var(--space-5); }
.service-card { background: #fff; padding: var(--space-5) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.service-title { margin: 0 0 var(--space-2); font-size: 1.05rem; }
.service-desc { margin: 0; font-size: .95rem; color: var(--color-muted); }
.service-card:focus-within, .service-card:hover { border-color: var(--color-accent); }

.contact-teaser { padding: var(--space-7) 0 var(--space-8); }
.contact-teaser .big { font-size: 1.1rem; font-weight: 600; }

.site-footer { border-top: 1px solid var(--color-border); padding: var(--space-6) 0; background: #fff; }
.site-footer a { color: var(--color-accent); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.small { font-size: .8rem; }
.muted { color: var(--color-muted); }

.legal { padding: var(--space-7) 0 var(--space-8); }
.legal h1 { margin-top: 0; }

/* Utility */
.flex { display: flex; }
.center-y { align-items: center; }
.between { justify-content: space-between; }
.big { font-size: 1.15rem; }

/* Focus styles for interactive elements */
a:focus-visible, button:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }

/* Responsive Tweaks */
@media (max-width: 640px) {
  .site-header .container { flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); }
  /* On mobile, show navigation first and move the logo below for more space */
  .site-header nav { order: 1; }
  .site-header .brand { order: 2; }
  /* Let the nav wrap and center, so links don't squeeze the logo */
  .nav { gap: var(--space-2); flex-wrap: wrap; justify-content: center; }
  /* Enlarge the logo for better visibility on mobile */
  .brand-with-logo .logo { height: 64px; max-height: none; width: auto; }
  .hero { padding: var(--space-7) 0 var(--space-6); }
  .contact-teaser { padding: var(--space-6) 0 var(--space-7); }
}
