/* ==========================================================================
   Bauelementwerke Aktion – Basis: Schriften, Tokens, Reset, Layout
   CI: Navy #15375F, Orange #F28100, Grau #666666, Michroma + Open Sans
   ========================================================================== */

@font-face {
  font-family: "Michroma";
  src: url("../fonts/michroma-400.woff2") format("woff2");
  font-weight: 400;
  unicode-range: U+0000-20AB, U+20AD-FFFF; /* ohne €: Michroma hat kein Euro-Zeichen */
  font-style: normal;
  font-display: swap;
}

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

/* Metrik-angepasste Ersatzschrift: verhindert Layoutsprünge, bis Open Sans geladen ist
   (wichtig für den Direkteinstieg per Hash) */
@font-face {
  font-family: "Open Sans Fallback";
  src: local("Arial"), local("ArialMT"), local("Helvetica"), local("Roboto");
  size-adjust: 105.44%;
  ascent-override: 101.03%;
  descent-override: 27.69%;
  line-gap-override: 0%;
}

:root {
  /* CI-Farben */
  --navy: #15375f;
  --orange: #f28100;
  --grey: #666666;

  /* Designerweiterungen (keine CI-Pflichtfarben) */
  --navy-deep: #0e2742;
  --navy-ink: #0b1c30;
  --ink: #101c2b;
  --orange-hover: #ff9a26;
  --paper: #f6f8fa;
  --line: #dce2e9;
  --muted: #4a5868;
  --white: #fff;
  --whatsapp: #1f8f4e;

  --font-display: "Michroma", "Open Sans", "Open Sans Fallback", sans-serif;
  --font-text: "Open Sans", "Open Sans Fallback", sans-serif;

  --container: 1320px;
  --gutter: clamp(18px, 4.2vw, 64px);
  --section-y: clamp(64px, 9vw, 136px);
  --radius: 14px;
  --radius-lg: 22px;

  --header-h: 106px; /* mobil: Kopfzeile + Kapitelreiter inkl. Linien */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow: 0 18px 50px -24px rgba(11, 28, 48, .45);
}

@media (min-width: 1100px) {
  :root { --header-h: 79px; }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: clamp(1rem, .96rem + .2vw, 1.0875rem);
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  overflow-x: clip;
}

body.is-locked { overflow: hidden; }

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

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.02em;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

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

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

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--orange);
  color: var(--ink);
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Sprungziele nie unter dem Sticky Header */
[id] { scroll-margin-top: var(--header-h); }

/* Typografie-Bausteine */
.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(.68rem, .64rem + .2vw, .8rem);
  letter-spacing: .14em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--eyebrow-color, var(--orange));
}

.display {
  font-size: clamp(2.3rem, 1.4rem + 3.6vw, 5rem);
  letter-spacing: -.03em;
  line-height: 1.02;
}

.h2 {
  font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3.5rem);
  letter-spacing: -.025em;
}

.h3 {
  font-size: clamp(1.3rem, 1.1rem + .8vw, 1.75rem);
  letter-spacing: -.015em;
  line-height: 1.2;
}

.lead {
  font-size: clamp(1.08rem, 1rem + .45vw, 1.3rem);
  line-height: 1.6;
}

.prose p + p { margin-top: 1em; }
.prose { max-width: 62ch; }

.muted { color: var(--c-muted, var(--muted)); }

.footnote {
  font-size: .8125rem;
  line-height: 1.55;
  color: var(--c-muted, var(--muted));
}

/* Einblenden beim Scrollen – nur mit JS und ohne reduzierte Bewegung */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity .8s var(--ease), transform .8s var(--ease);
  }
  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
  .js .reveal[data-delay="1"] { transition-delay: .08s; }
  .js .reveal[data-delay="2"] { transition-delay: .16s; }
  .js .reveal[data-delay="3"] { transition-delay: .24s; }
}

/* Abstands-Utilities (statt Inline-Styles, CSP-tauglich) */
.m-0 { margin: 0 !important; }
.mt-s { margin-top: 14px; }
.mt-m { margin-top: 18px; }
.mt-l { margin-top: 28px; }
.mt-xl { margin-top: clamp(48px, 7vw, 104px); }
.mb-l { margin-bottom: 28px !important; }
.measure-80 { max-width: 80ch; }
.text-white { color: var(--white); }
