/* Alijaj Hauswartung — base: fonts, reset, element defaults, focus ring, reduced motion.
   The only file that styles bare element selectors. */

/* Metric-matched fallbacks: Arial scaled to the width of Source Sans 3 per weight (German test texts at
   100 px: 400 → 93.1 %, 600 → 89.6 %, 700 → 92.0 %), with Source Sans 3's own ascent/descent
   (1.024 / 0.400 em ÷ size-adjust), so the swap from fallback to web font moves little. */
@font-face {
  font-family: "Source Sans 3 Fallback";
  font-weight: 400;
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Helvetica");
  size-adjust: 93.1%;
  ascent-override: 110%;
  descent-override: 43%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Source Sans 3 Fallback";
  font-weight: 600;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Helvetica Bold");
  size-adjust: 89.6%;
  ascent-override: 114.3%;
  descent-override: 44.6%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Source Sans 3 Fallback";
  font-weight: 700;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Helvetica Bold");
  size-adjust: 92%;
  ascent-override: 111.3%;
  descent-override: 43.5%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

html {
  overflow-x: clip;
  font-size: 100%;                       /* root stays 16 px at every width */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--ah-header-h) + var(--ah-space-16));  /* focus and anchors land below the sticky header */
  scroll-padding-bottom: var(--ah-space-16);                           /* and the focus ring is not cut by the viewport bottom */
}

body {
  overflow-x: clip;
  margin: 0;
  background: var(--ah-color-white);
  color: var(--ah-color-text);
  font-family: var(--ah-font);
  font-size: var(--ah-fs-body);
  line-height: var(--ah-lh-body);
  font-weight: var(--ah-fw-regular);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  overflow-wrap: break-word;   /* fix round 1: a long German word breaks instead of running out of its box */
  hyphens: manual;
  color: var(--ah-color-heading);
  font-weight: var(--ah-fw-semibold);
  text-wrap: balance;
}
h1 { font-size: var(--ah-fs-h1); line-height: var(--ah-lh-h1); letter-spacing: var(--ah-ls-h1); font-weight: var(--ah-fw-bold); }
h2 { font-size: var(--ah-fs-h2); line-height: var(--ah-lh-h2); letter-spacing: var(--ah-ls-h2); font-weight: var(--ah-fw-heavy); }
h3 { font-size: var(--ah-fs-h3); line-height: var(--ah-lh-h3); letter-spacing: var(--ah-ls-h3); }
h4 { font-size: var(--ah-fs-h4); line-height: var(--ah-lh-h4); letter-spacing: var(--ah-ls-h4); font-weight: var(--ah-fw-bold); }

p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; }
p { max-width: var(--ah-measure); }

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

a {
  color: var(--ah-color-link);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--ah-dur-fast) var(--ah-ease-standard), text-decoration-color var(--ah-dur-fast) var(--ah-ease-standard);
}
a:hover, a.is-demo-hover { color: var(--ah-color-link-hover); text-decoration-thickness: 2px; }
/* Round 1: visited text links (running text, footer, legal, reference names, plain links) get a violet-navy colour.
   Navigation, buttons, tiles, link lists and links on dark grounds are not text links in this sense and keep theirs. */
a:not([class]):visited,
.ah-link--inline:visited,
.ah-link--standalone:visited,
.ah-footer a:not(.ah-logo):visited,
.ah-legal__body a:visited { color: var(--ah-color-visited); }
:is(.ah-on-dark, .ah-section--blue, .ah-hero) a:visited:not(.ah-btn) { color: var(--ah-color-white); }
a:not([class]):visited:hover,
.ah-link--inline:visited:hover,
.ah-link--standalone:visited:hover,
.ah-footer a:not(.ah-logo):visited:hover,
.ah-legal__body a:visited:hover { color: var(--ah-color-navy); }
a.is-demo-focus {
  outline: var(--ah-focus-width) solid var(--ah-focus-color);
  outline-offset: var(--ah-focus-offset);
}

strong, b { font-weight: var(--ah-fw-bold); }

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

/* Focus ring: one rule for the whole site. Blue on light grounds, white on dark ones
   (components set --ah-focus-color). Offset keeps it outside the element, never on a photo. */
:focus { outline: none; }
:focus-visible {
  outline: var(--ah-focus-width) solid var(--ah-focus-color);
  outline-offset: var(--ah-focus-offset);
}

::selection { background: var(--ah-color-navy); color: var(--ah-color-white); }

/* Browser surfaces (revision 1): the caret and the page scrollbar carry the brand too. */
html { scrollbar-color: var(--ah-color-blue-mid) var(--ah-color-tint); scrollbar-width: auto; }
input, textarea, [contenteditable] { caret-color: var(--ah-color-blue); }

/* Reduced motion: no animation, no transition, no movement on hover. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

