/* ==========================================================================
   Arfmann Rechtsanwaltsgesellschaft mbH – Stylesheet
   Nachbau des WordPress-Entwurfs (Theme Twenty Twenty-Five, angepasst)
   ========================================================================== */

/* ---------- Schriften (lokal gehostet, kein Google-CDN) ---------- */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/inter-300.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: italic; font-weight: 300; font-display: swap; src: url("../fonts/inter-300-italic.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-700.woff") format("woff"); }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/lora-700.woff") format("woff"); }
@font-face { font-family: "Lora"; font-style: italic; font-weight: 700; font-display: swap; src: url("../fonts/lora-700-italic.woff") format("woff"); }

/* ---------- Design-Tokens ---------- */
:root {
  --c-base: #ffffff;
  --c-contrast: #002132;     /* Dunkelblau – Text, Footer */
  --c-accent-1: #0188cc;     /* Blau – Buttons (Logo-Balken) */
  --c-accent-2: #896541;     /* Braun – Logo */
  --c-accent-3: #a9c2cf;
  --c-accent-4: #686868;
  --c-accent-5: #fbfaf3;     /* Creme – Kontaktboxen, Zitate */
  --c-line: color-mix(in srgb, currentColor 20%, transparent);

  --f-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-serif: "Lora", Georgia, "Times New Roman", serif;

  --fs-small: 0.875rem;
  --fs-medium: clamp(1rem, 1rem + ((1vw - 0.2rem) * 0.294), 1.125rem);
  --fs-large: clamp(1.125rem, 1.125rem + ((1vw - 0.2rem) * 0.588), 1.375rem);
  --fs-xl: clamp(1.75rem, 1.75rem + ((1vw - 0.2rem) * 0.588), 2rem);
  --fs-xxl: clamp(2.15rem, 2.15rem + ((1vw - 0.2rem) * 2), 3rem);

  --sp-20: 10px;
  --sp-30: 20px;
  --sp-40: 30px;
  --sp-50: clamp(30px, 5vw, 50px);
  --sp-60: clamp(30px, 7vw, 70px);
  --sp-70: clamp(50px, 7vw, 90px);
  --sp-80: clamp(70px, 10vw, 140px);

  --w-content: 760px;
  --w-wide: 1000px;
  --gutter: var(--sp-50);
  --gap: 1.3rem;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--c-base);
  color: var(--c-contrast);
  font-family: var(--f-sans);
  font-weight: 300;
  font-size: var(--fs-medium);
  line-height: 1.6;
  letter-spacing: -0.3px;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--f-serif);
  font-weight: 700;
  line-height: 1.125;
  letter-spacing: -0.1px;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--fs-xxl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-large); line-height: 1.2; }
h4 { font-size: var(--fs-medium); }

p, ul, ol, blockquote, figure { margin: 0; }
ul, ol { padding-left: 1.5em; }
li + li { margin-top: 0.35em; }
strong, b { font-weight: 700; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
}
a:hover { text-decoration: none; }
:focus-visible { outline: 2px solid var(--c-accent-1); outline-offset: 3px; border-radius: 2px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--c-contrast); color: var(--c-base);
  padding: 0.75rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Layout-Container ---------- */
.container,
.container-wide {
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container      { max-width: calc(var(--w-content) + 2 * var(--gutter)); }
.container-wide { max-width: calc(var(--w-wide) + 2 * var(--gutter)); }

/* Abstand zwischen Inhalt und Footer – gilt für jede Seite */
main { padding-bottom: var(--sp-60); }
main > .contact-band:last-child { padding-bottom: 0; }

/* vertikaler Rhythmus wie WordPress-Block-Gap */
.flow > * + * { margin-top: var(--gap); }

/* ---------- Header ---------- */
.site-header { padding-inline: var(--sp-30); position: relative; z-index: 20; background: var(--c-base); }
.site-header__inner {
  max-width: var(--w-wide);
  margin-inline: auto;
  min-height: 120px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-40);
}
.site-logo { display: block; align-self: flex-start; flex-shrink: 0; }
.site-logo img { width: 100px; height: 120px; }

.main-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: flex-end;
  column-gap: var(--gap); row-gap: 0;
}
.main-nav li + li { margin-top: 0; }
.main-nav a {
  display: block;
  font-size: var(--fs-medium);
  text-decoration: none;
  padding-block: 0.15rem;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }

.nav-toggle, .nav-close { display: none; }

@media (max-width: 799px) {
  .site-header__inner { align-items: center; min-height: 0; }
  .site-logo img { width: 75px; height: 90px; }
  .js .nav-toggle {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: none; border: 0; padding: 0.5rem; margin-right: -0.5rem;
    color: inherit; font: inherit; cursor: pointer;
  }
  .nav-toggle svg, .nav-close svg { width: 28px; height: 28px; }
  .js .main-nav {
    position: fixed; inset: 0;
    background: var(--c-base);
    padding: var(--sp-60) var(--gutter);
    display: none;
    overflow-y: auto;
  }
  .js .main-nav.is-open { display: block; }
  .js .nav-close {
    display: inline-flex; position: absolute; top: 1rem; right: 1rem;
    background: none; border: 0; padding: 0.5rem; color: inherit; cursor: pointer;
  }
  .js .main-nav ul { flex-direction: column; align-items: flex-start; gap: 0.75rem; margin-top: var(--sp-40); }
  .js .main-nav a { font-family: var(--f-serif); font-weight: 700; font-size: var(--fs-xl); }
  .no-js .main-nav ul { justify-content: flex-start; }
  body.nav-open { overflow: hidden; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--c-accent-1);
  color: #fff;
  font-family: var(--f-sans);
  font-size: var(--fs-medium);
  font-weight: 300;
  line-height: 1.2;
  text-decoration: none;
  padding: 1rem 2.25rem;
  border-radius: 9999px;
  border: 0;
  transition: background-color 0.15s ease;
}
.btn:hover { background: color-mix(in srgb, var(--c-accent-1) 85%, #000); text-decoration: none; }
.btn-row { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--sp-30); }

/* ---------- Startseite: Hero ---------- */
.hero {
  position: relative;
  margin-top: var(--sp-30);
  margin-bottom: var(--sp-50);
  padding: var(--sp-70) var(--sp-40);
  background-color: #eef1f3;
  background-size: cover;
  background-position: center;
  isolation: isolate;
}
.hero::before {               /* Aufhellung wie im Entwurf */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(255, 255, 255, 0.62);
}
.hero__inner { max-width: var(--w-content); margin-inline: auto; text-align: center; }
.hero__inner > * + * { margin-top: var(--sp-40); }
.hero h1 { font-size: var(--fs-xxl); }
.hero__inner p { font-size: var(--fs-large); }
.hero__tag { font-weight: 700; }   /* Unterzeile fett für Lesbarkeit vor dem Bild */

/* ---------- Abschnitte Startseite ---------- */
.section-title { margin-bottom: var(--sp-50); }

.services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-50);
}
.service img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 24px; }
.service h3 a { text-decoration: none; }
.service h3 a:hover { text-decoration: underline; }
.service ul { padding-left: 1.4em; }
.service .more { font-size: var(--fs-medium); }
.service .more a + a { margin-left: 0.9em; }

@media (max-width: 899px) {
  .services { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 599px) {
  .services { grid-template-columns: 1fr; }
}

.news { margin-top: var(--sp-60); }
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: var(--gap);
}
.news-grid.is-page { margin-top: 0; }
.post-card { padding: 30px; }
.post-card > * + * { margin-top: var(--gap); }
.post-card h2 { font-size: var(--fs-large); line-height: 1.2; }   /* wie die Kacheln auf der Startseite (h3) */
.post-card h3 a, .post-card h2 a { text-decoration: none; }
.post-card h3 a:hover, .post-card h2 a:hover { text-decoration: underline; }
.post-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.post-card time { display: block; font-size: var(--fs-small); color: var(--c-accent-4); }
@media (min-width: 700px) {            /* Titel, Bild, Datum, Teaser, Link liegen in allen Kacheln einer Reihe auf gleicher Höhe */
  .post-card { display: grid; grid-row: span 5; grid-template-rows: subgrid; row-gap: var(--gap); }
  .post-card > * + * { margin-top: 0; }
  .post-card img { align-self: start; }
}
@media (max-width: 699px) {
  .news-grid { grid-template-columns: 1fr; }
  .post-card { padding: 30px 0; }
}
.news .btn-row { margin-top: var(--sp-30); }

/* ---------- Kontaktbox (Visitenkarte) ---------- */
.contact-band { padding-block: var(--sp-50); }
.contact-card {
  max-width: var(--w-wide);
  margin-inline: auto;
  background: var(--c-accent-5);
  padding: var(--sp-30);
  display: grid;
  grid-template-columns: minmax(0, 33%) minmax(0, 1fr);
  gap: var(--sp-50);
  align-items: center;
}
.contact-card--text { grid-template-columns: 1fr; padding: var(--sp-50); }   /* ohne Foto: nur Text */
.contact-card__media { background: var(--c-base); }
.contact-card__media img,
.contact-card__media svg { width: 100%; max-width: 326px; aspect-ratio: 1; object-fit: cover; display: block; }
.contact-card__body > * + * { margin-top: var(--sp-40); }
.contact-card .phone-big { font-size: var(--fs-xl); line-height: 1.2; }
.contact-card .phone-big a { font-weight: 300; }
@media (max-width: 699px) {
  .contact-card { grid-template-columns: 1fr; }
  .contact-card__media { max-width: 220px; }
}

/* ---------- Unterseiten ---------- */
.page-main { margin-top: var(--sp-60); }
.page-main h1 {
  font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.4rem);
  line-height: 1.15;
  text-wrap: pretty;
}
.page-header h1 .kicker {
  display: block;
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: var(--fs-medium);
  letter-spacing: 0;
  line-height: 1.3;
  color: var(--c-accent-2);
  margin-bottom: 0.6rem;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.page-header .featured {
  margin-top: var(--gap);
  margin-bottom: var(--sp-60);
}
.page-header .featured img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

.prose { font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem); line-height: 1.65; }  /* Fließtext 17 px Desktop, 16 px mobil */
.prose > * + * { margin-top: var(--gap); }
.prose h2 { margin-top: calc(var(--sp-50) + 0.25rem); }
.prose h3 { margin-top: var(--sp-40); }
.prose h2 + *, .prose h3 + * { margin-top: 0.9rem; }
.prose .lead { font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem); line-height: 1.55; }

/* Zitat-/Hinweisbox wie im Entwurf */
.quote {
  border-left: 2px solid var(--c-contrast);
  padding: var(--sp-30) var(--sp-40);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.65;
}
.quote > * + * { margin-top: var(--gap); }
.quote__item {
  background: var(--c-accent-5);
  padding: 1.25em 1.75em;
  font-style: italic;
}
.quote__item h3 { font-size: 1.1875rem; font-style: normal; margin: 0 0 0.4rem; }
.quote__item h3 + p { margin-top: 0; }
@media (max-width: 599px) {
  .quote { padding: var(--sp-20) 0 var(--sp-20) var(--sp-30); }
  .quote__item { padding: 1em 1.25em; }
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: var(--sp-50) var(--sp-40);
  margin-top: var(--sp-50);
}
.person img, .person svg { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: center 20%; background: #f2f2f2; display: block; }
.person h2 { font-size: var(--fs-large); margin-top: var(--sp-30); }
.person__quals {                     /* Beruf + Spezialisierungen: gleichrangige Listenpunkte */
  padding: 0.75rem 0 0 1.15em; margin-top: 0.75rem;
  border-top: 1px solid var(--c-line);
  font-size: 0.9375rem; line-height: 1.4;
}
.person__quals li::marker { color: var(--c-accent-2); }
.person__quals li + li { margin-top: 0.45rem; }

/* Rechtstexte */
.legal h2 { font-size: var(--fs-large); }
.legal dl { margin: 0; }
.legal dt { font-weight: 700; margin-top: var(--gap); }
.legal dd { margin: 0; }

/* Markierung offener Inhalte – vor Livegang entfernen */
.todo {
  background: #fff6d6;
  outline: 1px dashed #c9a227;
  outline-offset: 2px;
  padding: 0 0.2em;
}
p.todo, div.todo { padding: 0.75rem 1rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-contrast);
  color: var(--c-base);
  padding-top: var(--sp-60);
  padding-bottom: var(--sp-50);
}
.site-footer__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--sp-80);
  row-gap: var(--sp-50);
}
.site-footer__cols > div > * + * { margin-top: var(--gap); }
.site-footer .tagline { font-size: var(--fs-large); }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li + li { margin-top: 0; }
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.site-footer__legal {
  margin-top: var(--sp-70);
  display: flex; justify-content: center; gap: var(--gap);
}
.site-footer :focus-visible { outline-color: var(--c-base); }
@media (max-width: 699px) {
  .site-footer__cols { grid-template-columns: 1fr; }
}

/* ---------- 404 ---------- */
.notfound { text-align: center; padding-block: var(--sp-70); }
.notfound > * + * { margin-top: var(--sp-40); }

/* ---------- Druck ---------- */
@media print {
  .site-header nav, .nav-toggle, .contact-band, .site-footer__legal, .hero::before { display: none !important; }
  .site-footer { background: none; color: #000; }
  a { text-decoration: none; }
}
