/* ==========================================================================
   Base — reset, element defaults, accessibility primitives
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--s-4));
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--c-paper);
  color: var(--c-ink);
  font-family: var(--f-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  font-feature-settings: "tnum" 0, "ss01" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  /* German compounds: headings carry &shy; break points; this is the safety net */
  overflow-wrap: break-word;
  hyphens: manual;
}

/* Grid/flex children may shrink below their longest word */
.split > *,
.content-layout > *,
.enquiry > *,
.section-head > *,
.hero__inner > *,
.finder > *,
.case-sheet > *,
.case-grid > *,
.form__row > *,
.field {
  min-width: 0;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 700;
  line-height: var(--lh-snug);
  letter-spacing: -0.01em;
  /* Long German compounds must never overflow on 320px screens */
  overflow-wrap: break-word;
  hyphens: auto;
}

/* English does not need automatic hyphenation ("pro-ductive") */
:lang(en) h1,
:lang(en) h2,
:lang(en) h3,
:lang(en) h4 {
  hyphens: manual;
}

h1 {
  font-size: var(--fs-2xl);
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--fs-xl);
}

h3 {
  font-size: var(--fs-md);
}

p,
ul,
ol,
dl,
figure,
blockquote {
  margin: 0;
}

p + p {
  margin-top: var(--s-4);
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

strong {
  font-weight: 650;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

table {
  border-collapse: collapse;
  width: 100%;
}

hr {
  border: 0;
  border-top: 1px solid var(--c-line);
  margin: var(--s-7) 0;
}

::selection {
  background: var(--c-signal);
  color: var(--c-ink);
}

/* --- Focus: always visible for keyboard users ---------------------------- */
:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--c-signal);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--c-ink);
  border-radius: var(--radius-1);
}

.section--dark :focus-visible,
.site-footer :focus-visible {
  box-shadow: none;
}

/* --- Skip link ----------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: var(--s-2);
  left: var(--s-2);
  z-index: 1000;
  padding: var(--s-3) var(--s-4);
  background: var(--c-signal);
  color: var(--c-ink);
  font-weight: 650;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* --- Screen-reader-only -------------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}
