/* ==========================================================
   Kanzlei Schwarzenau – statische One-Page
   Farbwelt: Orange #F7941D (Logo-Welle), Anthrazit, Weiß
   ========================================================== */

:root {
  --orange: #F7941D;
  --orange-hover: #d97b06;
  --ink: #1f1f1f;
  --ink-soft: #444;
  --bg: #ffffff;
  --bg-alt: #f7f5f2;
  --line: #e8e4de;
  --muted: #888;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

:root[data-theme="dark"] {
  --orange: #F7941D;
  --orange-hover: #ffb04d;
  --ink: #ececec;
  --ink-soft: #b8b8b8;
  --bg: #191919;
  --bg-alt: #242220;
  --line: #3a3a3a;
  --muted: #9a9a9a;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  transition: background 0.25s ease, color 0.25s ease;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.25;
}

a { color: var(--orange); }
a:hover { color: var(--orange-hover); }

/* ---------- Header ---------- */

.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.logo {
  height: 84px;
  width: auto;
  aspect-ratio: 420 / 118;
  display: block;
}

.logo-text { fill: var(--ink); }
.logo-line { stroke: var(--ink); }

.main-nav a {
  font-family: var(--serif);
  color: var(--ink);
  text-decoration: none;
  margin-left: 1.25rem;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.main-nav a:hover {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

/* ---------- Hero ---------- */

.hero {
  text-align: center;
  padding: 3rem 0 2.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0.5rem 0 0;
  letter-spacing: 0.02em;
}

.hero-sub {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--ink-soft);
  margin-top: 0.25rem;
}

.hero-text {
  max-width: 640px;
  margin: 1.5rem auto;
  color: var(--ink-soft);
}

.btn {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-family: var(--serif);
  font-size: 1.15rem;
  text-decoration: none;
  padding: 0.7rem 1.8rem;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.btn:hover { background: var(--orange-hover); color: #fff; }

/* ---------- Dark-Mode-Umschalter ---------- */

.theme-toggle {
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1;
  padding: 0.45rem 0.7rem;
  margin-left: 1.25rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: inline; }

:root[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ---------- Wellen (Logo-Motiv) ---------- */

.wave { display: block; margin: 0 auto; }
.wave-top    { width: min(260px, 60%); height: 34px; }
.wave-bottom { width: min(260px, 60%); height: 34px; margin-top: 2rem; }
.wave-footer { width: min(220px, 50%); height: 28px; margin: 1.5rem auto 0; }

.divider {
  display: block;
  width: 100%;
  height: 48px;
  margin: 0;
}

/* Überschrift mit Wellen-Unterstreichung */
.wave-heading {
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M4 9 Q 60 -4 116 7' fill='none' stroke='%23F7941D' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E")
    no-repeat left bottom / 160px 12px;
}

/* ---------- Sektionen ---------- */

.section { padding: 3rem 0; }
.section-alt { background: var(--bg-alt); }

/* Fachgebiete-Karten */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg-alt);
  border-top: 3px solid var(--orange);
  border-radius: 6px;
  padding: 1.25rem 1.4rem;
}

.card h3 { margin-top: 0; font-size: 1.15rem; }
.card p { margin-bottom: 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Über die Kanzlei ---------- */

.about {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.about-photo {
  margin: 0;
  flex: 0 0 auto;
  text-align: center;
}

.about-photo img {
  display: block;
  width: 220px;
  height: auto;
  border-radius: 6px;
  border-bottom: 4px solid var(--orange);
}

.about-photo figcaption {
  font-family: var(--serif);
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 0.6rem;
  line-height: 1.4;
}

.about-text { flex: 1; }
.about-text p:first-child { margin-top: 0; }

@media (max-width: 640px) {
  .about { flex-direction: column; align-items: center; }
}

/* ---------- Kontakt ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.contact-card {
  font-style: normal;
  background: var(--bg-alt);
  border-left: 4px solid var(--orange);
  border-radius: 6px;
  padding: 1.25rem 1.4rem;
}

.contact-card h3 { margin-top: 0; }

.muted { color: var(--muted); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  padding-bottom: 1.5rem;
  text-align: center;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.site-footer nav a {
  color: var(--ink-soft);
  text-decoration: none;
  margin-left: 1rem;
}

.site-footer nav a:hover { color: var(--orange); }

/* ---------- Unterseiten (Impressum / Datenschutz) ---------- */

.legal-page .container { max-width: 760px; }
.legal-page h1 { margin-top: 2rem; }
.legal-page .section { padding-top: 1rem; }

/* ---------- Mobil ---------- */

@media (max-width: 600px) {
  .header-inner { flex-direction: column; }
  .logo { height: 68px; }
  .main-nav a { margin: 0 0.6rem; }
  .theme-toggle { margin-left: 0.6rem; }
  .footer-inner { flex-direction: column; }
  .site-footer nav a { margin: 0 0.5rem; }
}
