/* ===== Base reset ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ===== Theme tokens ===== */
:root{
  --bg: #f9f9fb;
  --text: #222;
  --muted: #666;
  --card: #ffffff;
  --primary: #1f2937;   /* dark gray */
  --primary-hover: #374151;
  --link: #0a66c2;      /* readable blue */
  --border: #e5e7eb;
}

/* ===== Body & global typography ===== */
html { scroll-behavior: smooth; }
body{
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.65;
  background: var(--bg);
  color: var(--text);
}

/* a readable content width on desktop, fluid on mobile */
body, main, section, header, footer{
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* headings */
h1 { font-size: 2rem; line-height: 1.2; margin: 0.5rem 0 0.75rem; }
h2 { font-size: 1.5rem; line-height: 1.3; margin: 1.5rem 0 0.75rem; }
h3 { font-size: 1.125rem; margin: 1rem 0 0.5rem; }
p  { margin: 0.75rem 0; color: var(--text); }
ul { list-style: disc; margin: 0.5rem 0 0.5rem 1.25rem; }
li { margin: 0.35rem 0; }

/* links */
a{ color: var(--link); text-decoration: none; }
a:hover{ text-decoration: underline; }

/* ===== Header / Nav ===== */
header{
  background: var(--primary);
  color: #fff;
  padding: 14px 0;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
header nav{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}
header h1{ margin: 0; font-size: 1.25rem; }
header nav ul{
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
header nav ul li a{
  color: #fff;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
}
header nav ul li a:hover{ background: var(--primary-hover); }

/* ===== Hero ===== */
#hero{
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 18px;
  margin-bottom: 28px;
}
#hero h2{ font-size: 1.75rem; margin: 0 0 6px; }
#hero p{ color: var(--muted); margin-bottom: 12px; }
#hero a{
  display: inline-block;
  padding: 10px 16px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
}
#hero a:hover{ background: var(--primary-hover); }
.hero-img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 3px solid var(--border);
}
/* Flex layout for hero */
.hero-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  text-align: left;
}

.hero-flex .hero-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
}

.hero-flex .hero-text h2 {
  margin: 0 0 0.5rem;
}

.hero-flex .hero-text p {
  margin-bottom: 0.75rem;
  color: var(--muted);
}

/* Mobile: stack image above text */
@media (max-width: 640px) {
  .hero-flex {
    flex-direction: column;
    text-align: center;
  }
}


/* ===== Sections (index) ===== */
section{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 22px;
}
section h2{
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}

/* ===== Contact ===== */
#contact p a{ font-weight: 600; }

/* ===== Footer ===== */
footer{
  text-align: center;
  padding: 18px 0 28px;
  color: var(--muted);
  background: transparent;
  border-top: 1px solid var(--border);
  margin-top: 24px;
}
footer a{ color: var(--link); }

/* ===== Legal pages (impressum.html & datenschutz.html) ===== */
body > header h1{ color:#fff; }            /* keep header readable */
main{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 22px;
}
main h2{ border-bottom: 1px solid var(--border); padding-bottom: 6px; }
main ul{ list-style: disc; margin-left: 1.25rem; }

/* ===== Accessibility niceties ===== */
:focus-visible{ outline: 3px solid #94c6ff; outline-offset: 2px; }

/* ===== Mobile tweaks ===== */
@media (max-width: 640px){
  body, main, section, header, footer{ padding-left: 14px; padding-right: 14px; }
  header nav{ flex-direction: column; align-items: flex-start; }
  header nav ul{ width: 100%; flex-wrap: wrap; }
  header nav ul li a{ padding: 8px 10px; }
  h1{ font-size: 1.6rem; }
  h2{ font-size: 1.35rem; }
  #hero{ padding: 22px 14px; }
  #hero h2{ font-size: 1.5rem; }
  section{ padding: 16px; }
  li{ margin: 0.3rem 0; }
}

/* ===== Dark mode (optional, honors system setting) ===== */
@media (prefers-color-scheme: dark){
  :root{
    --bg:#0b0e12; --text:#e7e9ee; --muted:#b5bdc8;
    --card:#11161d; --primary:#0f172a; --primary-hover:#111827;
    --link:#7bb4ff; --border:#1f2937;
  }
  header{ border-bottom-color: var(--border); }
  section, main{ border-color: var(--border); }
  footer{ border-top-color: var(--border); }
}
