:root {
  --bg: #fcfbf9;
  --surface: #f3f1ec;
  --ink: #1c1e22;
  --muted: #5d626b;
  --line: #e3dfd8;
  --accent: #7a2230;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 72rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Platz für die Scrollleiste immer freihalten, damit der Header auf kurzen
     Seiten (Startseite) nicht seitlich verspringt */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
address {
  margin: 0;
}

address {
  font-style: normal;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.15;
  overflow-wrap: break-word;
  text-wrap: balance;
}

h1,
.section > h2 {
  font-size: clamp(1.875rem, 3.6vw, 2.25rem);
}

h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
}

strong {
  font-weight: 600;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 20;
  padding: 0.5rem 0.9rem;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.5rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(252, 251, 249, 0.94);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  min-height: 4.75rem;
}

.brand {
  display: flex;
  flex-direction: column;
  padding-block: 0.75rem;
  text-decoration: none;
  text-transform: uppercase;
  line-height: 1.25;
}

.brand__name {
  font-size: 1.375rem;
  font-weight: 500;
  /* so gewählt, dass der Name genau mit der Zeile darunter abschließt;
     main.js gleicht Abweichungen anderer Systemschriften aus */
  letter-spacing: 0.194em;
}

.brand__title {
  margin-top: 0.2rem;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.site-nav {
  display: flex;
  gap: clamp(1.25rem, 2.4vw, 2.25rem);
}

.site-nav a {
  position: relative;
  padding: 0.5rem 0;
  font-size: 0.9375rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.2rem;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
}

.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -0.5rem;
  padding: 0 0.6rem;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.2s, opacity 0.2s;
}

@media (max-width: 57.99rem) {
  .site-header__inner {
    flex-wrap: wrap;
  }

  .site-nav {
    flex-wrap: wrap;
    gap: 0 1.25rem;
    width: 100%;
    padding-bottom: 0.75rem;
  }

  /* Mit JavaScript: Navigation als aufklappbares Menü */
  .js .site-header__inner {
    flex-wrap: nowrap;
  }

  .js .nav-toggle {
    display: flex;
    flex: none;
  }

  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 0;
    width: auto;
    padding: 0.25rem var(--gutter) 1rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1.5rem 2rem -1.5rem rgba(28, 30, 34, 0.25);
  }

  .js .site-header.is-open .site-nav {
    display: flex;
  }

  .js .site-nav a {
    padding: 0.9rem 0;
    font-size: 1.0625rem;
  }

  .js .site-nav a + a {
    border-top: 1px solid var(--line);
  }

  .js .site-nav a::after {
    display: none;
  }

  .is-open .nav-toggle span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
  }

  .is-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }

  .is-open .nav-toggle span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
  }
}

@media (max-width: 26rem) {
  .brand__name {
    font-size: 1rem;
    letter-spacing: 0.22em;
  }

  .brand__title {
    font-size: 0.5625rem;
    letter-spacing: 0.08em;
  }
}

/* Startseite */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: clamp(24rem, 70vh, 48rem);
  color: #fff;
}

/* Bild links um die Breite der Scrollleiste einrücken, damit es
   symmetrisch zum freigehaltenen Scrollleistenplatz rechts sitzt
   (--scrollbar wird in main.js gesetzt) */
.hero > img {
  position: absolute;
  inset: 0;
  left: var(--scrollbar, 0px);
  z-index: -2;
  width: calc(100% - var(--scrollbar, 0px));
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

.hero .wrap {
  padding-block: clamp(2.5rem, 7vw, 5rem);
}

.hero h1 {
  /* einzeilig, solange die Breite reicht; sonst ausgewogen umbrechen */
  font-size: clamp(2.375rem, 5.6vw, 4.5rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

/* Unterseiten */

.banner {
  height: clamp(10rem, 28vw, 22rem);
  background: var(--surface);
}

.banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--pos, 50% 50%);
}

/* Bild vollständig zeigen statt auf Bannerhöhe zuschneiden */
.banner--uncropped {
  height: auto;
}

.banner--uncropped img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(30rem, 60vh);
  margin-inline: auto;
}

.page {
  padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(3.5rem, 9vw, 7rem);
}

.section {
  display: grid;
  gap: 1.5rem 4rem;
}

.section + .section {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
  border-top: 1px solid var(--line);
}

.section > * {
  min-width: 0;
}

@media (min-width: 64rem) {
  .section {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  }

  .section__head {
    position: sticky;
    top: 7.5rem;
    align-self: start;
  }
}

.eyebrow {
  margin-bottom: 0.6rem;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.prose {
  max-width: 40rem;
}

.prose > * + * {
  margin-top: 1.15em;
}

.prose p,
.prose li {
  -webkit-hyphens: auto;
  hyphens: auto;
}

.prose h2 {
  font-size: clamp(1.375rem, 2.4vw, 1.625rem);
  line-height: 1.3;
}

.prose h3 {
  margin-top: 2.25em;
}

.prose h3 + * {
  margin-top: 0.6em;
}

.prose a,
.contact a {
  text-decoration: underline;
  text-decoration-color: #c9c3b8;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.15s, text-decoration-color 0.15s;
}

.prose a:hover,
.contact a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.list {
  padding: 0;
  list-style: none;
}

.list li {
  position: relative;
  padding-left: 1.5rem;
}

.list li + li {
  margin-top: 0.5em;
}

.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 0.75rem;
  height: 1px;
  background: var(--accent);
}

.prose ol {
  padding-left: 1.5rem;
}

.prose ol li + li {
  margin-top: 0.5em;
}

.prose ol ol {
  margin-top: 0.5em;
  list-style: lower-alpha;
}

/* Anwalt */

.about {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.about img {
  width: 100%;
  object-fit: cover;
  background: var(--surface);
}

@media (min-width: 40rem) {
  .about {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .about img {
    order: 2;
    aspect-ratio: 4 / 5;
  }
}

/* Kontakt */

/* Titel links, Text rechts – der Block als Ganzes mittig unter dem Bild */
.section--centered {
  grid-template-columns: auto;
  justify-content: center;
}

.section--centered .section__head {
  position: static;
}

@media (min-width: 36rem) {
  .section--centered {
    grid-template-columns: auto auto;
    column-gap: clamp(2.5rem, 8vw, 6rem);
  }
}

.contact {
  font-size: 1.1875rem;
  line-height: 1.6;
}

.contact__name {
  font-weight: 600;
}

.contact dl {
  margin-top: 1.75rem;
}

.contact dt {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact dd + dt {
  margin-top: 1.1rem;
}

.contact dd {
  overflow-wrap: anywhere;
}

/* Veröffentlichungen */

.pubs {
  padding: 0;
  list-style: none;
}

.pubs li {
  padding-block: 1.1rem;
  border-top: 1px solid var(--line);
}

.pubs li:first-child {
  padding-top: 0;
  border-top: 0;
}

.pub-title {
  display: block;
  font-weight: 500;
  line-height: 1.45;
}

a.pub-title {
  text-decoration: underline;
  text-decoration-color: #c9c3b8;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.15s, text-decoration-color 0.15s;
}

a.pub-title:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.pub-ref {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--muted);
}

/* 404 */

.notice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.notice p {
  color: var(--muted);
}

.button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.8rem 1.5rem;
  background: var(--ink);
  color: #fff;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: background-color 0.15s;
}

.button:hover {
  background: var(--accent);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--muted);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1.5rem;
}

.site-footer nav {
  display: flex;
  gap: 1.75rem;
}

.site-footer a {
  text-decoration: none;
  transition: color 0.15s;
}

.site-footer a:hover {
  color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

@media print {
  .site-header,
  .site-footer nav,
  .banner {
    display: none;
  }
}
