@font-face {
  font-family: "Figtree";
  src: url("../fonts/Figtree.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f4f2ee;
  --surface: #fbfaf8;
  --ink: #121212;
  --ink-soft: #55524b;
  --line: #dcd7ce;
  --dark: #141414;
  --on-dark: #f4f2ee;
  --on-dark-soft: #a9a59d;
  --available: #2f7d4f;

  --font: "Figtree", "Helvetica Neue", Arial, sans-serif;
  --wrap: clamp(1440px, 72vw, 1800px);
  --gutter: clamp(20px, 5vw, 56px);
  --radius: 20px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Type scale: every text role uses one of these sizes. */
  --fs-h2: clamp(36px, min(4.4vw, 7vh), 60px);
  --fs-number: clamp(34px, min(3.8vw, 6vh), 56px);
  --fs-h3: 28px;
  --fs-h4: 21px;
  --fs-lead: 21px;
  --fs-body: 19px;
  --fs-small: 16px;
  --fs-xs: 15px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 20px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0;
  text-wrap: balance;
  overflow-wrap: break-word;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ol,
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 999px;
}

.skip-link:focus {
  top: 12px;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 28px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: 600 17px/1 var(--font);
  text-decoration: none;
  transition: background-color 220ms var(--ease-out), color 220ms var(--ease-out), border-color 220ms var(--ease-out), transform 220ms var(--ease-out);
}

.button svg {
  flex: none;
  transition: transform 260ms var(--ease-out);
}

.button:hover svg:last-child {
  transform: translateX(3px);
}

.button:active {
  transform: scale(0.98);
}

.button-primary {
  background: var(--ink);
  color: var(--bg);
}

.button-primary:hover {
  background: #2b2b2b;
}

.button-secondary {
  border-color: var(--ink);
  color: var(--ink);
}

.button-secondary:hover {
  background: var(--ink);
  color: var(--bg);
}

.button-light {
  background: var(--on-dark);
  color: var(--dark);
}

.button-light:hover {
  background: #ffffff;
}

.button-outline-light {
  border-color: rgba(244, 242, 238, 0.45);
  color: var(--on-dark);
}

.button-outline-light:hover {
  border-color: var(--on-dark);
  background: var(--on-dark);
  color: var(--dark);
}

.button-small {
  min-height: 48px;
  padding: 0 22px;
  font-size: 18px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(244, 242, 238, 0);
  border-bottom: 1px solid transparent;
  transition: background-color 300ms var(--ease-out), border-color 300ms var(--ease-out);
}

.site-header.is-scrolled {
  background: rgba(244, 242, 238, 0.86);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom-color: var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 80px;
}

.brand {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav > a:not(.button) {
  position: relative;
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color 200ms var(--ease-out);
}

.nav > a:not(.button)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 280ms var(--ease-out);
}

.nav > a:not(.button):hover {
  color: var(--ink);
}

.nav > a:not(.button):hover::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
}

/* Hero: everything important fits on the first screen */

.hero {
  --header: 80px;
  display: flex;
  min-height: calc(100svh - var(--header));
  padding: clamp(12px, 3vh, 40px) 0 clamp(20px, 3.5vh, 40px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 1fr auto;
  grid-template-areas:
    "text portrait"
    "facts facts";
  column-gap: clamp(32px, 4.4vw, 72px);
  row-gap: clamp(16px, 3.6vh, 48px);
}

.hero-text {
  grid-area: text;
  align-self: center;
  container-type: inline-size;
}

/* Sized by the column width so no word ever breaks, and by the viewport height so the facts stay visible. */
.hero-title {
  font-size: clamp(36px, min(11.8cqi, 12.6vh), 156px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  overflow-wrap: normal;
  margin-bottom: clamp(18px, 3vh, 30px);
}

.hero-lead {
  font-size: clamp(19px, min(1.7vw, 2.8vh), 27px);
  color: var(--ink-soft);
  max-width: 30em;
  margin-bottom: clamp(16px, 2.6vh, 26px);
}

.hero-actions .button {
  min-height: clamp(64px, min(4.4vw, 6.2vh), 80px);
  padding: 0 clamp(34px, 2.2vw, 44px);
  font-size: clamp(19px, min(1.1vw, 1.9vh), 23px);
}

.hero-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-small);
  font-weight: 600;
  margin-bottom: clamp(20px, 3.4vh, 34px);
}

.status-dot {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--available);
}

.status-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--available);
  animation: pulse 2.4s var(--ease-out) infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(3); opacity: 0; }
}

.hero-portrait {
  grid-area: portrait;
  align-self: center;
  margin: 0;
}

.portrait-frame {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--line);
}

.portrait-frame img {
  height: clamp(260px, min(100svh - 340px, 0.42 * min(100vw, var(--wrap)) - 47px), 720px);
  width: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.hero-portrait figcaption {
  width: 0;
  min-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 14px;
  font-size: var(--fs-small);
  line-height: 1.4;
  color: var(--ink-soft);
}

.hero-portrait figcaption strong {
  font-size: var(--fs-body);
  color: var(--ink);
}

/* Facts strip at the bottom of the hero */

.facts-grid {
  grid-area: facts;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
}

.fact {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: clamp(16px, 2.6vh, 26px) 24px 0 0;
}

.fact + .fact {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.fact dt {
  font-size: var(--fs-number);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.fact dd {
  margin: 0;
  font-size: var(--fs-small);
  line-height: 1.3;
  color: var(--ink-soft);
}

/* Hero entrance */

.js .hero-text > * {
  animation: rise 900ms var(--ease-out) both;
}

.js .hero-text > :nth-child(2) { animation-delay: 60ms; }
.js .hero-text > :nth-child(3) { animation-delay: 160ms; }
.js .hero-text > :nth-child(4) { animation-delay: 260ms; }
.js .hero-text > :nth-child(5) { animation-delay: 360ms; }

.js .portrait-frame {
  animation: fade 1400ms var(--ease-out) 200ms both;
}

.js .hero-portrait figcaption {
  animation: rise 900ms var(--ease-out) 600ms both;
}

.js .fact {
  animation: rise 900ms var(--ease-out) both;
}

.js .fact:nth-child(1) { animation-delay: 450ms; }
.js .fact:nth-child(2) { animation-delay: 530ms; }
.js .fact:nth-child(3) { animation-delay: 610ms; }
.js .fact:nth-child(4) { animation-delay: 690ms; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Scroll reveal */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Clients map: map and marquee fit on one screen */

.clients {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100svh - 88px);
  padding: clamp(28px, 5vh, 64px) 0 clamp(24px, 4vh, 48px);
  background: var(--surface);
  overflow: hidden;
}

.clients-grid {
  container-type: inline-size;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.clients-text {
  container-type: inline-size;
}

/* Capped by the column width so the longest word never breaks (the map takes the rest of the row). */
.clients h2 {
  font-size: min(var(--fs-h2), 13.5cqi);
  margin-bottom: clamp(14px, 2.4vh, 22px);
}

.clients-lead {
  font-size: var(--fs-lead);
  color: var(--ink-soft);
  max-width: 30em;
  margin-bottom: clamp(18px, 3vh, 32px);
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: clamp(18px, 3vh, 32px);
  font-size: var(--fs-small);
  color: var(--ink-soft);
}

.map-legend li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--surface);
}

.legend-dot.is-client {
  background: var(--ink);
}

/* Width follows the content; the script animates width changes between courts. */
.map-card {
  display: grid;
  gap: 4px;
  width: fit-content;
  min-width: 240px;
  max-width: 100%;
  overflow: hidden;
  transition: width 500ms var(--ease-out);
  padding: 22px 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.map-card-type {
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--ink-soft);
}

/* Scales with the text column so long names like Neubrandenburg always fit. */
.map-card-city {
  font-size: min(var(--fs-number), 11cqi);
  white-space: nowrap;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

/* State and status always share one line so the card never changes height. */
.map-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
  font-size: clamp(13px, calc((100cqi - 56px) / 25.5), var(--fs-small));
  color: var(--ink-soft);
}

.map-card-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.map-card-status::before {
  content: "";
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
}

.map-card-status.is-client {
  color: var(--ink);
  font-weight: 600;
}

.map-card-status.is-client::before {
  background: var(--ink);
}

.map-card.is-changing > * {
  animation: fade 700ms var(--ease-out) both;
}

.map {
  position: relative;
  justify-self: end;
  height: clamp(300px, min(100svh - 322px, 40vw), 880px);
}

.map-land {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.map-land path {
  fill: #e7e2d9;
  stroke: var(--surface);
  stroke-width: 1.4;
  stroke-linejoin: round;
  transition: fill 600ms var(--ease-out);
}

.map-land path.is-current {
  fill: #d3cdc1;
}

.map-pins li {
  display: contents;
}

.map-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
  font: inherit;
}

.map-pin::before,
.map-pin::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.map-pin::before {
  width: 11px;
  height: 11px;
  border: 2px solid var(--ink);
  background: var(--surface);
  transition: width 300ms var(--ease-out), height 300ms var(--ease-out), background-color 300ms var(--ease-out);
}

.map-pin.is-client::before {
  width: 13px;
  height: 13px;
  background: var(--ink);
}

.map-pin::after {
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--ink);
  opacity: 0;
}

.map-pin:hover::before,
.map-pin.is-current::before {
  width: 16px;
  height: 16px;
}

.map-pin.is-current::after {
  animation: ping 1.8s var(--ease-out) infinite;
}

@keyframes ping {
  0% { width: 16px; height: 16px; opacity: 0.6; }
  100% { width: 52px; height: 52px; opacity: 0; }
}

.map-pin-label {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 2px);
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out);
}

.map-pin.is-current {
  z-index: 2;
}

.map-pin.is-edge-end .map-pin-label {
  left: auto;
  right: -4px;
  transform: translateY(6px);
}

.map-pin.is-edge-start .map-pin-label {
  left: -4px;
  transform: translateY(6px);
}

.map-pin.is-edge-end.is-current .map-pin-label,
.map-pin.is-edge-start.is-current .map-pin-label {
  transform: none;
}

.map-pin.is-current .map-pin-label {
  opacity: 1;
  transform: translate(-50%, 0);
}

.js .map-pin {
  opacity: 0;
  transform: scale(0);
  transition: opacity 500ms var(--ease-out), transform 700ms cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-delay: var(--pin-delay, 0ms);
}

.js .map.is-visible .map-pin {
  opacity: 1;
  transform: none;
}

html:not(.js) .marquee {
  display: none;
}

.marquee {
  margin-top: clamp(20px, 4vh, 48px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

/* The cities are stacked at the left edge; site.js moves each one along the band. */
.marquee-track {
  position: relative;
  height: 1.25em; /* room for descenders, the marquee clips its overflow */
  font-size: clamp(34px, min(4.6vw, 6.6vh), 72px);
}

.marquee-track li {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 0.28em;
  padding-right: clamp(36px, 4.4vw, 72px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.25;
  white-space: nowrap;
}

/* Same markers as the map legend: filled for past clients, ring for the rest of the service area. */
.marquee-track li::before {
  content: "";
  flex: none;
  width: 0.2em;
  height: 0.2em;
  border: max(2px, 0.045em) solid var(--ink);
  border-radius: 50%;
}

.marquee-track li.is-client::before {
  background: var(--ink);
}

/* Sections */

.section {
  padding: clamp(48px, 8vh, 128px) 0;
}

.section-light {
  background: var(--surface);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: start;
}

.section-head h2 {
  font-size: var(--fs-h2);
  margin-bottom: 18px;
}

.section-head p {
  font-size: var(--fs-lead);
  color: var(--ink-soft);
  max-width: 22em;
}

.split .section-head {
  position: sticky;
  top: 120px;
}

.section-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 48px;
  margin-bottom: clamp(28px, 5vh, 56px);
}

.section-head-row h2 {
  margin-bottom: 0;
}

/* Services */

.services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 20px);
}

.service {
  container-type: inline-size;
  padding: 22px 28px 26px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.js .service[data-reveal] {
  transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out), background-color 400ms var(--ease-out), color 400ms var(--ease-out), border-color 400ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms), var(--reveal-delay, 0ms), 0ms, 0ms, 0ms;
}

.service:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-dark);
}

.service-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: clamp(20px, 3.4vh, 48px);
}

.service-number {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink-soft);
  transition: color 400ms var(--ease-out);
}

.service-law {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 500;
  white-space: nowrap;
  color: var(--ink-soft);
  transition: color 400ms var(--ease-out), border-color 400ms var(--ease-out);
}

/* Sized by the card width so every title stays on one line. */
.service h3 {
  font-size: min(var(--fs-h3), 9.4cqi);
  letter-spacing: -0.03em;
  white-space: nowrap;
  margin-bottom: 12px;
}

.service p {
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 30em;
  transition: color 400ms var(--ease-out);
}

.service:hover .service-number,
.service:hover p,
.service:hover .service-law {
  color: var(--on-dark-soft);
}

.service:hover .service-law {
  border-color: rgba(244, 242, 238, 0.24);
}

/* Steps */

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 20px);
}

.step {
  container-type: inline-size;
  padding: 26px 28px 32px;
  border-radius: var(--radius);
  background: var(--surface);
}

.step-number {
  display: block;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: clamp(28px, 5vh, 56px);
}

/* Title and text shrink with the card on narrow four-column rows so no word breaks or overflows. */
.step h3 {
  font-size: min(var(--fs-h3), 15cqi);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.step p {
  font-size: min(var(--fs-body), 8.8cqi);
  line-height: 1.5;
  color: var(--ink-soft);
}

/* Timeline: the line draws in and the milestones follow quickly from left to right */

.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px;
  padding-top: 44px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 6px;
  height: 1.5px;
  background: var(--ink);
  transform-origin: left;
}

.timeline li {
  container-type: inline-size;
  position: relative;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: -44px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--surface);
}

.timeline li:last-child::before {
  background: var(--ink);
}

.timeline-year {
  display: block;
  font-size: var(--fs-number);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 16px;
}

/* Title and text shrink with the column on narrow five-column rows so no word breaks or overflows. */
.timeline h3 {
  font-size: min(var(--fs-h4), 12cqi);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.timeline p {
  font-size: min(var(--fs-body), 9.4cqi);
  line-height: 1.5;
  color: var(--ink-soft);
}

.js .timeline[data-reveal] {
  opacity: 1;
  transform: none;
}

.js .timeline::before {
  transform: scaleX(0);
  transition: transform 700ms var(--ease-out);
}

.js .timeline li {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}

.js .timeline li:nth-child(2) { transition-delay: 70ms; }
.js .timeline li:nth-child(3) { transition-delay: 140ms; }
.js .timeline li:nth-child(4) { transition-delay: 210ms; }
.js .timeline li:nth-child(5) { transition-delay: 280ms; }

.js .timeline.is-visible::before {
  transform: none;
}

.js .timeline.is-visible li {
  opacity: 1;
  transform: none;
}

/* Contact */

.contact {
  background: var(--dark);
  color: var(--on-dark);
  padding: clamp(96px, 12vw, 160px) 0 clamp(72px, 9vw, 120px);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(48px, 7vw, 112px);
  align-items: end;
}

.contact h2 {
  font-size: var(--fs-h2);
  letter-spacing: -0.045em;
  margin-bottom: 24px;
}

.contact-lead {
  font-size: var(--fs-lead);
  color: var(--on-dark-soft);
  margin-bottom: 36px;
}

.contact-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

/* Shrinks on very narrow phones so the e-mail address stays on one line. */
.contact-big {
  font-size: min(var(--fs-h3), (100vw - 2 * var(--gutter)) / 12);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
  transition: background-size 400ms var(--ease-out);
}

.contact-big:hover {
  background-size: 100% 1.5px;
}

.contact-list {
  width: 100%;
  margin: 28px 0 0;
  border-top: 1px solid rgba(244, 242, 238, 0.16);
}

.contact-list div {
  display: grid;
  grid-template-columns: 6em minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(244, 242, 238, 0.16);
  font-size: var(--fs-body);
}

.contact-list dt {
  color: var(--on-dark-soft);
}

.contact-list dd {
  margin: 0;
}

.contact-list a {
  text-decoration: none;
}

.contact-list a:hover {
  text-decoration: underline;
}

/* Footer */

.site-footer {
  background: var(--dark);
  color: var(--on-dark-soft);
  font-size: var(--fs-small);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  padding-top: 28px;
  padding-bottom: 32px;
  border-top: 1px solid rgba(244, 242, 238, 0.12);
}

.site-footer nav {
  display: flex;
  gap: 24px;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--on-dark);
}

/* Legal pages */

.legal {
  padding: clamp(48px, 7vw, 96px) 0 clamp(96px, 12vw, 160px);
}

.legal .wrap {
  max-width: 820px;
}

.legal h1 {
  font-size: clamp(40px, 5.4vw, 64px);
  margin-bottom: 40px;
}

.legal h2 {
  font-size: var(--fs-h3);
  letter-spacing: -0.02em;
  margin: 48px 0 12px;
}

.legal h3 {
  font-size: var(--fs-h4);
  letter-spacing: 0;
  margin: 24px 0 6px;
}

.legal p,
.legal address,
.legal li {
  color: var(--ink-soft);
}

.legal p,
.legal address {
  margin-bottom: 1em;
}

.legal ul {
  list-style: disc;
  padding-left: 1.2em;
  margin-bottom: 1em;
}

.legal address {
  font-style: normal;
}

/* Service cards on the start page link to their detail page; the whole card is the link target. */

.service {
  position: relative;
}

.service h3 a {
  color: inherit;
  text-decoration: none;
}

.service h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

/* Detail pages: title block, article with a sticky summary card, related services */

.page-hero {
  padding: clamp(32px, 6vh, 72px) 0 clamp(40px, 6vh, 72px);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: clamp(24px, 4vh, 40px);
  font-size: var(--fs-small);
  color: var(--ink-soft);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 10px;
  color: var(--line);
}

.breadcrumb a {
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-kicker {
  display: inline-block;
  margin-bottom: 18px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--ink-soft);
}

/* The lower bound shrinks on very narrow phones so the longest word part ("Schuldfähigkeits-") keeps a safe margin to the edge. */
.page-title {
  max-width: 16em;
  font-size: clamp(min(40px, (100vw - 2 * var(--gutter)) / 7.6), min(6vw, 9vh), 96px);
  line-height: 1;
  letter-spacing: -0.045em;
  margin-bottom: clamp(18px, 3vh, 28px);
}

.page-lead {
  max-width: 36em;
  font-size: clamp(19px, 1.5vw, 24px);
  color: var(--ink-soft);
  margin-bottom: clamp(24px, 4vh, 36px);
}

.page-body {
  padding: clamp(40px, 7vh, 96px) 0 clamp(64px, 10vh, 128px);
  background: var(--surface);
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
  gap: clamp(40px, 6vw, 112px);
  align-items: start;
}

.prose {
  max-width: 46em;
}

.prose h2 {
  font-size: clamp(30px, 3vw, 44px);
  letter-spacing: -0.035em;
  margin: clamp(48px, 7vh, 72px) 0 18px;
}

.prose > h2:first-child {
  margin-top: 0;
}

.prose h3 {
  font-size: var(--fs-h4);
  letter-spacing: -0.01em;
  margin: 28px 0 8px;
}

.prose p,
.prose li {
  color: var(--ink-soft);
}

.prose p + p,
.prose p + ul,
.prose p + ol,
.prose ul + p,
.prose ol + p {
  margin-top: 1em;
}

.prose ul {
  list-style: disc;
  padding-left: 1.2em;
}

.prose li + li {
  margin-top: 0.5em;
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.prose a {
  color: var(--ink);
  text-underline-offset: 3px;
}

.prose-steps {
  counter-reset: step;
  display: grid;
  gap: 14px;
}

.prose .prose-steps {
  list-style: none;
  padding: 0;
}

.prose-steps li {
  counter-increment: step;
  position: relative;
  padding: 20px 24px 22px 72px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.prose-steps li + li {
  margin-top: 0;
}

.prose-steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 24px;
  top: 21px;
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink-soft);
}

.prose-steps strong {
  display: block;
  margin-bottom: 4px;
}

.court-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.prose .court-list {
  list-style: none;
  padding: 0;
}

.court-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.3;
}

.court-list li + li {
  margin-top: 0;
}

.court-list span {
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--ink-soft);
}

.court-list .is-client span {
  color: var(--ink);
  font-weight: 600;
}

.page-aside {
  position: sticky;
  top: 112px;
  display: grid;
  gap: 16px;
}

.summary-card {
  padding: 26px 28px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.summary-card h2 {
  font-size: var(--fs-h4);
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.summary-card dl {
  margin: 0;
}

.summary-card dl div {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.summary-card dt {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--ink-soft);
}

.summary-card dd {
  margin: 2px 0 0;
  font-size: var(--fs-small);
  line-height: 1.45;
}

.summary-card a {
  text-underline-offset: 3px;
}

.cta-card {
  padding: 26px 28px 28px;
  border-radius: var(--radius);
  background: var(--dark);
  color: var(--on-dark);
}

.cta-card h2 {
  font-size: var(--fs-h4);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.cta-card p {
  font-size: var(--fs-small);
  color: var(--on-dark-soft);
  margin-bottom: 18px;
}

.cta-card .button {
  width: 100%;
}

.cta-card .button + .button {
  margin-top: 10px;
}

.page-updated {
  margin-top: clamp(40px, 6vh, 64px);
  font-size: var(--fs-xs);
  color: var(--ink-soft);
}

.related {
  padding: clamp(48px, 8vh, 112px) 0;
}

.related .services {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Footer: practice details and site links */

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: 40px clamp(32px, 5vw, 80px);
  padding-top: clamp(48px, 7vh, 72px);
  padding-bottom: 40px;
  border-top: 1px solid rgba(244, 242, 238, 0.12);
}

.site-footer .footer-grid {
  display: grid;
}

.site-footer .footer-grid nav {
  display: block;
}

.footer-brand {
  display: inline-block;
  margin-bottom: 10px;
  font-size: var(--fs-h4);
  font-weight: 700;
  color: var(--on-dark);
}

.footer-about p,
.footer-about address {
  max-width: 28em;
  font-style: normal;
  line-height: 1.55;
}

.footer-about address {
  margin-top: 14px;
}

.footer-grid h2 {
  margin-bottom: 14px;
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0;
  color: var(--on-dark);
}

.footer-grid ul {
  display: grid;
  gap: 8px;
}

.site-footer .footer-bottom {
  padding-top: 20px;
  padding-bottom: 28px;
}

/* Responsive */

@media (max-width: 1200px) {
  .fact {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .fact dt {
    font-size: clamp(30px, min(3.6vw, 5vh), 48px);
  }
}

@media (max-width: 1000px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .split .section-head {
    position: static;
  }

  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding: 0 0 0 40px;
  }

  .timeline::before {
    left: 6px;
    right: auto;
    top: 8px;
    bottom: 8px;
    width: 1.5px;
    height: auto;
    transform-origin: top;
  }

  .timeline li::before {
    left: -40px;
    top: 6px;
  }

  .timeline-year {
    font-size: 36px;
    margin-bottom: 8px;
  }

  .js .timeline::before {
    transform: scaleY(0);
  }

  .page-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-aside {
    position: static;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .related .services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .related .services .service:first-child {
    grid-column: 1 / -1;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-about {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    width: 44px;
    height: 44px;
    margin-right: -8px;
    padding: 0 10px;
    background: none;
    border: 0;
    cursor: pointer;
  }

  .nav-toggle span {
    display: block;
    height: 1.5px;
    background: var(--ink);
    transition: transform 300ms var(--ease-out);
  }

  .nav-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(4.25px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-4.25px) rotate(-45deg);
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 28px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 260ms var(--ease-out), transform 260ms var(--ease-out), visibility 0s linear 260ms;
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: 0s;
  }

  .site-header:has(.nav.is-open) {
    background: var(--bg);
    border-bottom-color: var(--line);
  }

  .nav > a:not(.button) {
    font-size: 20px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

  .nav > a:not(.button)::after {
    display: none;
  }

  .nav .button {
    margin-top: 20px;
    min-height: 52px;
  }

  .hero {
    min-height: 0;
    padding: 8px 0 56px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas:
      "text"
      "portrait"
      "facts";
    row-gap: 28px;
  }

  /* Phones: the portrait runs full width below the buttons, its top already visible on the first screen. */
  .hero-portrait {
    max-width: 520px;
  }

  .portrait-frame img {
    width: 100%;
    height: auto;
    max-height: 72svh;
    object-position: 50% 22%;
  }

  .hero-title {
    margin-bottom: 14px;
  }

  .hero-lead {
    margin-bottom: 14px;
  }

  .hero-status {
    margin-bottom: 18px;
  }

  .facts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fact {
    padding: 14px 12px 14px 0;
    gap: 4px;
  }

  .fact:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .fact:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .fact dt {
    font-size: clamp(30px, 8.4vw, 44px);
  }

  .fact dd {
    font-size: var(--fs-xs);
  }

  .clients {
    min-height: 0;
    padding: 64px 0 40px;
  }

  .clients h2 {
    margin-bottom: 12px;
  }

  .clients-lead {
    font-size: 17px;
    margin-bottom: 18px;
  }

  .map-legend {
    gap: 6px 20px;
    margin-bottom: 8px;
    font-size: var(--fs-xs);
  }

  .clients-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .clients-text {
    display: contents;
  }

  .map {
    justify-self: center;
    width: 100%;
    max-width: 520px;
    height: auto;
    margin-bottom: 14px;
  }

  /* Full width, so the card keeps its size while the tour switches courts. */
  .map-card {
    order: 2;
    min-width: 100%;
    padding: 16px 20px 18px;
  }

  .marquee {
    margin-top: 28px;
  }

  .marquee-track {
    font-size: clamp(28px, 8.4vw, 44px);
  }

}

@media (max-width: 560px) {
  :root {
    --fs-h3: 25px;
    --fs-lead: 19px;
    --fs-body: 18px;
    --fs-small: 15px;
    --fs-xs: 14px;
  }

  body {
    font-size: 18px;
  }

  .hero-lead {
    font-size: 18px;
    line-height: 1.5;
  }

  .hero-actions {
    flex-wrap: nowrap;
    gap: 10px;
  }

  .hero-actions .button {
    flex: 1 1 auto;
    min-height: 52px;
    padding: 0 18px;
    font-size: 16px;
  }

  .hero-actions .button-primary svg {
    display: none;
  }

  .contact .button-row .button {
    width: 100%;
  }

  .services {
    grid-template-columns: minmax(0, 1fr);
  }

  .service {
    padding: 24px 24px 28px;
  }

  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-list div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  /* Phones: the highlighted state on the map already shows the state, keep the status on one line. */
  .map-card-state {
    display: none;
  }

  .map-card-meta {
    font-size: var(--fs-small);
  }

  .related .services {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  /* The number moves above the title so long words keep the full card width. */
  .prose-steps li {
    padding: 18px 20px 20px;
  }

  .prose-steps li::before {
    position: static;
    display: block;
    margin-bottom: 6px;
  }

  .summary-card,
  .cta-card {
    padding: 22px 22px 24px;
  }
}

/* Short laptop screens: tighter vertical rhythm so each section still fits one screen. */
@media (min-width: 901px) and (max-height: 820px) {
  .section {
    padding: 36px 0;
  }

  .section-head-row {
    margin-bottom: 22px;
  }

  .service,
  .step {
    padding: 18px 24px 22px;
  }

  .service-top,
  .step-number {
    margin-bottom: 14px;
  }

  .clients {
    padding: 20px 0 14px;
  }

  .clients h2 {
    margin-bottom: 10px;
  }

  .clients-lead,
  .map-legend {
    margin-bottom: 14px;
  }

  .map-card {
    padding: 16px 22px 18px;
  }

  .marquee {
    margin-top: 16px;
  }
}

@media (max-width: 900px) and (max-height: 700px) {
  .hero {
    padding-top: 0;
  }

  .hero-title {
    font-size: 32px;
    margin-bottom: 10px;
  }

  .hero-lead {
    font-size: 17px;
    margin-bottom: 10px;
  }

  .hero-status {
    margin-bottom: 14px;
  }

  .hero-grid {
    row-gap: 14px;
  }

  .fact {
    padding: 10px 10px 10px 0;
  }

  .fact dt {
    font-size: 28px;
  }
}

@media (max-width: 900px) and (max-height: 600px) {
  .hero-title {
    font-size: 29px;
  }

  .hero-lead {
    font-size: 16px;
  }

  .hero-actions .button {
    min-height: 46px;
  }

  .fact dt {
    font-size: 24px;
  }
}
