/* ==========================================================================
   Stommel & Sengenberger — Kanzleiwebsite
   Stilangaben. Mobile-First. Breakpoints: 640px / 960px / 1200px.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Custom Properties (Design-Token)
   -------------------------------------------------------------------------- */
:root {
  /* Farben — gedeckte Grau-, Silber-, Blautöne */
  --color-bg: #f7f8fa;          /* Seitenhintergrund, sehr helles Grau */
  --color-surface: #ffffff;     /* Karten, Header, Flächen */
  --color-text: #1f2933;        /* dunkles Anthrazit, Fließtext */
  --color-text-muted: #52606d;  /* Sekundärtext */
  --color-accent: #3a5a7a;      /* gedecktes Stahlblau, Links */
  --color-accent-deep: #2a3f55; /* dunkleres Blau, Hover/Überschriften */
  --color-border: #d8dde3;      /* silbrige Rahmen */
  --color-divider: #e4e7eb;     /* feine Trennlinien */

  /* Typografie */
  --font-serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', Palatino,
                'Times New Roman', serif;
  --font-sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
               Arial, sans-serif;

  /* Layout */
  --container-max: 1140px;
  --container-pad: 1.5rem;
  --content-max: 46rem;         /* Lesebreite für Textseiten */

  /* Abstände */
  --space-section: clamp(3rem, 8vw, 5.5rem);
}

/* --------------------------------------------------------------------------
   2. Reset / Grundlagen
   -------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;          /* ~17px */
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

img,
svg { display: block; max-width: 100%; height: auto; }

a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  transition: color 200ms ease;
}
a:hover { color: var(--color-accent-deep); }

h1, h2, h3 {
  font-family: var(--font-serif);
  color: var(--color-accent-deep);
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 0.6em;
}

p { margin: 0 0 1rem; }

/* Sichtbarer Fokus für Tastaturnutzung */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* Animationen für Nutzer mit reduzierter Bewegungspräferenz abschalten */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
}

/* --------------------------------------------------------------------------
   3. Hilfsklassen
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* Nur für Screenreader sichtbar */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* Sprunglink "Zum Inhalt" */
.skip-link {
  position: absolute;
  left: 1rem; top: -3.5rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--color-accent-deep);
  color: #ffffff;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  transition: top 200ms ease;
}
.skip-link:focus { top: 0; }

/* Kleines Überschriften-Label ("Kicker") */
.eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* --------------------------------------------------------------------------
   4. Kopfbereich & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-divider);
}

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--color-accent-deep);
}
.brand__mark { width: 42px; height: 42px; flex: none; }
.brand__name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Menü-Schalter (nur mobil sichtbar, nur wenn JS aktiv) */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  color: var(--color-text);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}
.nav-toggle__bars {
  position: relative;
  width: 20px; height: 2px;
  background: currentColor;
}
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px; height: 2px;
  background: currentColor;
}
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after  { top: 6px; }

.site-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.98rem;
}
.site-nav a:hover { color: var(--color-accent); }

/* Verhalten bei aktivem JavaScript (Klasse wird von main.js gesetzt):
   unterhalb 960px wird die Navigation eingeklappt und per Schalter geöffnet. */
@media (max-width: 59.99em) {
  .nav-enhanced .nav-toggle { display: inline-flex; }
  .nav-enhanced .site-nav {
    display: none;
    flex-basis: 100%;
  }
  .nav-enhanced .site-nav.is-open { display: block; }
  .nav-enhanced .site-nav__list {
    flex-direction: column;
    gap: 0;
    padding-block: 0.5rem 0.75rem;
  }
  .nav-enhanced .site-nav a {
    display: block;
    padding: 0.65rem 0.25rem;
    border-top: 1px solid var(--color-divider);
  }
}

/* --------------------------------------------------------------------------
   5. Sektions-Grundlayout
   -------------------------------------------------------------------------- */
.section {
  padding-block: var(--space-section);
  border-top: 1px solid var(--color-divider);
  scroll-margin-top: 1.5rem;
}
.section__head { margin-bottom: 2.5rem; }
.section h2 {
  font-size: clamp(1.55rem, 1rem + 2vw, 2.1rem);
}

/* --------------------------------------------------------------------------
   6. Hero
   -------------------------------------------------------------------------- */
.hero {
  background: linear-gradient(180deg, var(--color-surface) 0%, var(--color-bg) 100%);
  scroll-margin-top: 1.5rem;
}
.hero__inner {
  padding-block: clamp(3.5rem, 10vw, 7rem);
}
.hero__title {
  font-size: clamp(2.1rem, 1.2rem + 4vw, 3.4rem);
  margin-bottom: 0.5rem;
}
.hero__rule {
  width: 64px; height: 2px;
  margin: 1.5rem 0;
  background: var(--color-accent);
  border: 0;
}
.hero__claim {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.3rem);
  color: var(--color-text-muted);
  max-width: 38rem;
  margin: 0;
}

/* --------------------------------------------------------------------------
   7. Über die Kanzlei
   -------------------------------------------------------------------------- */
.about__grid { display: grid; gap: 2.5rem; }
.about__text > p:last-child { margin-bottom: 0; }
.about__figure {
  margin: 0;
}
.about__figure img {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 3px;
}
.about__figure figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

@media (min-width: 60em) {
  .about__grid {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: 3.5rem;
  }
}

/* --------------------------------------------------------------------------
   8. Rechtsgebiete
   -------------------------------------------------------------------------- */
.areas__grid { display: grid; gap: 1.5rem; }
.area-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 3px;
  padding: 1.75rem 1.75rem 1.5rem;
}
.area-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}
.area-card p:last-child { margin-bottom: 0; }

@media (min-width: 40em) {
  .areas__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* --------------------------------------------------------------------------
   9. Sprechzeiten
   -------------------------------------------------------------------------- */
.hours {
  width: 100%;
  max-width: 34rem;
  border-collapse: collapse;
}
.hours th,
.hours td {
  padding: 0.7rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--color-divider);
  vertical-align: top;
}
.hours th[scope="row"] {
  font-weight: 600;
  color: var(--color-accent-deep);
  white-space: nowrap;
  padding-right: 1.5rem;
}
.hours td { color: var(--color-text-muted); }
.hours__note {
  margin-top: 1.25rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* --------------------------------------------------------------------------
   10. Kontakt & Anfahrt
   -------------------------------------------------------------------------- */
.contact__grid { display: grid; gap: 2.5rem; }

.contact__address { font-style: normal; }
.contact__firm {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--color-accent-deep);
}
.contact__list {
  margin: 1.25rem 0 0;
  display: grid;
  gap: 0.5rem;
}
.contact__list > div {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 0.5rem;
}
.contact__list dt {
  font-weight: 600;
  color: var(--color-text-muted);
}
.contact__list dd { margin: 0; }

.map { margin: 0; }
.map img {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 3px;
}
.map__caption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.map__link { margin: 0.75rem 0 0; }

@media (min-width: 60em) {
  .contact__grid {
    grid-template-columns: 0.85fr 1.15fr;
    gap: 3.5rem;
  }
}

/* --------------------------------------------------------------------------
   11. Fußbereich
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding-block: 2.5rem;
  font-size: 0.92rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}
.site-footer__name {
  margin: 0;
  font-family: var(--font-serif);
  color: var(--color-accent-deep);
}
.site-footer__nav ul {
  display: flex;
  gap: 1.5rem;
  margin: 0; padding: 0;
  list-style: none;
}
.site-footer__nav a {
  text-decoration: none;
  color: var(--color-text);
}
.site-footer__nav a:hover { color: var(--color-accent); }
.site-footer__copy {
  margin: 0;
  color: var(--color-text-muted);
  flex-basis: 100%;
}

/* --------------------------------------------------------------------------
   12. Rechtstexte (Impressum / Datenschutz)
   -------------------------------------------------------------------------- */
.legal { padding-block: var(--space-section); }
.legal__inner { max-width: var(--content-max); }
.legal h1 {
  font-size: clamp(1.9rem, 1.3rem + 2.5vw, 2.6rem);
  margin-bottom: 1.5rem;
}
.legal h2 {
  font-size: 1.35rem;
  margin-top: 2.5rem;
}
.legal section:first-of-type h2 { margin-top: 1.5rem; }
.legal__lead {
  font-size: 1.12rem;
  color: var(--color-text-muted);
}
.legal ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}
.legal li { margin-bottom: 0.35rem; }
