/* ==========================================================================
   RSP Advice — Grundlagen: Reset, Schriften, Typografie, Layout-Helfer
   ========================================================================== */

/* --- Schriften (selbst gehostet, DSGVO-konform) --------------------------- */
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-latin-wght-italic.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

/* --- Typografie ----------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  color: var(--navy-700);
  margin: 0 0 var(--sp-3);
  text-wrap: balance;
}

h1 { font-size: var(--fs-hero); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); }
h4 { font-size: var(--fs-h4); line-height: var(--lh-snug); font-weight: 600; }

p { margin: 0 0 var(--sp-3); max-width: var(--measure); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--link-hover); }

strong { font-weight: 600; color: var(--navy-700); }

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

/* Überschrift mit feiner Vorzeile — das wiederkehrende Sektionsmotiv */
.eyebrow {
  display: block;
  font-family: var(--font-body);
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 var(--sp-2);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--greige-500);
  vertical-align: middle;
  margin-right: 0.75em;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--ink-muted);
}

/* --- Layout --------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--bg-dark); color: #fff; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark .eyebrow { color: var(--greige-500); }
.section--dark .eyebrow::before { background: var(--navy-300); }
.section--dark a { color: #fff; }

.section__head { max-width: var(--container-narrow); margin-bottom: var(--sp-6); }

.stack > * + * { margin-top: var(--sp-3); }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.9rem 1.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: var(--fs-small);
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }

.btn--primary { background: var(--navy-700); color: #fff; }
.btn--primary:hover { background: var(--navy-900); color: #fff; }

.btn--ghost { background: transparent; color: var(--navy-700); border-color: var(--greige-500); }
.btn--ghost:hover { background: var(--navy-700); color: #fff; border-color: var(--navy-700); }

.btn--onDark { background: transparent; color: #fff; border-color: rgba(255,255,255,0.45); }
.btn--onDark:hover { background: #fff; color: var(--navy-700); border-color: #fff; }

.btn--light { background: #fff; color: var(--navy-700); }
.btn--light:hover { background: var(--greige-100); color: var(--navy-900); }

/* Textlink mit Pfeil */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  font-family: inherit;
  font-size: var(--fs-small);
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.link-arrow:hover { color: var(--link-hover); }
.link-arrow::after {
  content: "→";
  transition: transform var(--dur) var(--ease);
}
.link-arrow:hover::after { transform: translateX(4px); }

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

.skip-link {
  position: absolute; top: 0; left: 50%;
  transform: translate(-50%, -110%);
  background: var(--navy-700); color: #fff;
  padding: 0.75rem 1.5rem; z-index: 200;
  text-decoration: none;
}
.skip-link:focus { transform: translate(-50%, 0); color: #fff; }

/* Sanftes Einblenden beim Scrollen.
   Der Startzustand gilt nur, wenn JavaScript läuft — sonst bliebe der Inhalt
   bei einem Skriptfehler unsichtbar. */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
}
