/* ============================================================================
   SOUVERÄN – Brand Foundation (geteilt für ALLE Seiten)
   Design-Tokens, Reset, Typografie, Buttons, Cards, Header/Nav, Footer.
   Quelle: brand-referenz.html + logo-referenz.html (Stand 18.03.2026).
   Neue Seiten (z.B. /angebot) binden NUR diese Datei + ihre eigene page.css ein.
   ============================================================================ */

/* ---------- Self-hosted Font (kein Google-CDN, datenschutzfreundlich) ---------- */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;            /* variable */
  font-display: swap;
  src: url('../fonts/space-grotesk-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: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, 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;
}

/* ---------- Design-Tokens ---------- */
:root {
  /* Navy */
  --navy-dark:  #1C2D4F;   /* Hero / dunkler Hintergrund */
  --navy-med:   #243A63;   /* Cards, Flächen */
  --navy-light: #2E4877;   /* Borders, Trenner */
  --navy-muted: #3D5A8A;   /* Sekundär */

  /* Orange */
  --orange:       #E8923A; /* Primary / CTA / Logo / Akzent */
  --orange-dark:  #D07A28; /* Hover / Pressed */
  --orange-light: #F0A855; /* Highlights */
  --orange-soft:  #F5C882; /* subtile Akzente */

  /* Warm Gray + Weiß */
  --gray-dark:   #8A8578;  /* Muted Text / Captions */
  --gray-med:    #B5B0A6;  /* Subtext / Labels */
  --gray-light:  #D8D4CC;  /* Body auf dunkel */
  --warm-white:  #F5F0EB;  /* helle Sektionen */
  --white:       #FFFFFF;

  /* Semantische Rollen (hell) */
  --bg:           var(--warm-white);
  --bg-alt:       var(--white);
  --text:         #2A2A2A;
  --text-muted:   #5C5A54;
  --heading:      var(--navy-dark);
  --border:       #E2DCD2;

  /* Typo */
  --font: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --maxw: 760px;          /* Lesebreite Fließtext */
  --maxw-wide: 1080px;    /* Hero / Footer / breite Bereiche */
  --nav-h: 80px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(28, 45, 79, 0.08);
  --shadow-lg: 0 10px 40px rgba(28, 45, 79, 0.14);

  /* Spacing-Skala */
  --space-section: 88px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px); /* Anker-Offset unter sticky Nav */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--orange-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: var(--orange-soft); color: var(--navy-dark); }

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

/* ---------- Typografie ---------- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--heading);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.1rem); }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin-bottom: 1.1em; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 700; color: var(--heading); }

ul, ol { margin: 0 0 1.1em 1.25em; }
li { margin-bottom: 0.55em; }
li:last-child { margin-bottom: 0; }

.eyebrow {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-dark);
}

/* ---------- Layout-Helfer ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
.wrap-wide { width: 100%; max-width: var(--maxw-wide); margin-inline: auto; padding-inline: 22px; }
/* Lesebreite für Fließtext innerhalb breiter Container (linksbündig) */
.measure { max-width: var(--maxw); }

.section { padding-block: var(--space-section); }
.section--alt { background: var(--bg-alt); }
.section--navy { background: var(--navy-dark); color: var(--gray-light); }
.section--navy h2, .section--navy h3 { color: var(--white); }

/* ---------- Logo (Inline-SVG-Lockup) ---------- */
/* Eigene Logodateien? -> hier <img src="...logo.svg"> einsetzen statt der Lockup-Markup. */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
/* Echtes Logo-Bild (transparent) in der Nav */
.logo__img { height: 50px; width: auto; }
.logo__oval { flex-shrink: 0; }
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__name {
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 1.05rem;
  text-transform: uppercase;
}
.logo__tag {
  font-weight: 400;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: var(--orange);
  margin-top: 4px;
}
/* Logo auf dunklem Grund */
.logo--light .logo__name { color: var(--white); }
/* Logo auf hellem Grund */
.logo--dark .logo__name { color: var(--navy-dark); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .05s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--orange); color: var(--navy-dark); }
.btn--primary:hover { background: var(--orange-dark); color: var(--white); }

.btn--ghost {
  background: transparent;
  color: var(--orange);
  border-color: var(--orange);
}
.btn--ghost:hover { background: var(--orange); color: var(--navy-dark); }

/* Outline auf dunklem Grund */
.btn--on-navy { background: var(--orange); color: var(--navy-dark); }
.btn--on-navy:hover { background: var(--orange-light); color: var(--navy-dark); }

.btn--block { width: 100%; }

/* ---------- Cards & Callouts ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

/* Hinweis-/Akzentbox */
.callout {
  border-left: 4px solid var(--orange);
  background: rgba(232, 146, 58, 0.07);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin: 1.6em 0;
}
.callout--warn {
  border-left-color: var(--orange-dark);
  background: rgba(208, 122, 40, 0.09);
}
.callout p:last-child { margin-bottom: 0; }
.callout__title {
  font-weight: 700;
  color: var(--navy-dark);
  margin-bottom: .3em;
  display: block;
}

/* TODO-/Platzhalter-Markierung (für Lukas im sichtbaren Build erkennbar) */
.placeholder {
  border: 2px dashed var(--orange-dark);
  background: repeating-linear-gradient(
    45deg, rgba(232,146,58,.06), rgba(232,146,58,.06) 10px,
    rgba(232,146,58,.12) 10px, rgba(232,146,58,.12) 20px);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin: 1.6em 0;
  color: var(--text-muted);
}
.placeholder__tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--orange-dark);
  padding: 2px 9px;
  border-radius: 4px;
  margin-bottom: .6em;
}

/* ---------- Header / Sticky Anchor-Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(28, 45, 79, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--navy-light);
}
.site-nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.site-nav__menu {
  display: flex;
  align-items: center;
  gap: 18px;
}
.site-nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav__links li { margin: 0; }
.site-nav__links a {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray-light);
  letter-spacing: 0.01em;
}
.site-nav__links a:hover { color: var(--white); background: var(--navy-med); text-decoration: none; }
.site-nav__links a.is-active { color: var(--orange); }

/* Kontakt-Button (Aktion, rechts abgesetzt) */
.site-nav__cta {
  padding: 8px 18px;
  font-size: 0.92rem;
  white-space: nowrap;
}
.site-nav__cta.is-active { background: var(--orange); color: var(--navy-dark); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
  width: 42px; height: 42px;
}
.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  display: block;
  width: 24px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle__bar { position: relative; }
.nav-toggle__bar::before { content: ''; position: absolute; top: -7px; }
.nav-toggle__bar::after  { content: ''; position: absolute; top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after  { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-dark);
  color: var(--gray-med);
  font-size: 0.92rem;
  line-height: 1.65;
  padding-block: 56px 40px;
}
.site-footer h3 {
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: .6em;
}
.site-footer p { margin-bottom: 1.3em; color: var(--gray-med); }
.site-footer a { color: var(--orange-light); }
.footer__legal {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--navy-light);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  justify-content: space-between;
}
.footer__links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer__copy { color: var(--gray-dark); }

/* ---------- Affiliate-Sternchen / Fußnote ---------- */
.aff-mark { color: var(--orange); font-weight: 700; }
.aff-note { font-size: 0.82rem; color: var(--gray-dark); }

/* ---------- Bereichsseite: Header-Band + Inhalts-Leiste (TOC) ---------- */
.area-head {
  background: var(--navy-dark);
  color: var(--gray-light);
  padding-block: 48px 40px;
}
.area-head .eyebrow { color: var(--orange); display: block; margin-bottom: .5em; }
.area-head h1 { color: var(--white); margin-bottom: .35em; }
.area-head p { color: var(--gray-light); max-width: 60ch; margin: 0; }

.area {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding-block: 56px 80px;
}
.area__content { max-width: 760px; min-width: 0; }
.area__content h2 { scroll-margin-top: calc(var(--nav-h) + 28px); }
.area__content h2:first-child { margin-top: 0; }

/* TOC */
.toc {
  position: sticky;
  top: calc(var(--nav-h) + 28px);
  align-self: start;
}
.toc__title {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gray-dark);
  margin-bottom: 12px;
}
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.toc li { margin: 0; }
.toc a {
  display: block;
  padding: 7px 0 7px 16px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  font-size: .92rem;
  line-height: 1.4;
  color: var(--text-muted);
  font-weight: 500;
}
.toc a:hover { color: var(--navy-dark); text-decoration: none; }
.toc a.is-active {
  color: var(--orange-dark);
  border-left-color: var(--orange);
  font-weight: 600;
}

@media (max-width: 900px) {
  .area { grid-template-columns: 1fr; gap: 0; padding-top: 0; }
  /* unter Nav + sticky TOC-Pill-Leiste landen */
  .area__content h2 { scroll-margin-top: calc(var(--nav-h) + 72px); }
  /* TOC wird zur horizontalen, sticky Pill-Leiste unter der Top-Nav */
  .toc {
    position: sticky;
    top: var(--nav-h);
    z-index: 90;
    margin: 0 -22px 28px;
    padding: 0;
    background: rgba(245, 240, 235, 0.97);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--border);
  }
  .toc__title { display: none; }
  .toc ul {
    display: flex;
    gap: 8px;
    border-left: 0;
    overflow-x: auto;
    padding: 10px 22px;
    -webkit-overflow-scrolling: touch;
  }
  .toc a {
    white-space: nowrap;
    padding: 7px 14px;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--white);
  }
  .toc a.is-active {
    border-color: var(--orange);
    background: var(--orange);
    color: var(--navy-dark);
  }
  .section--alt.area, .area { background: transparent; }
}

/* ---------- Mobile ---------- */
@media (max-width: 720px) {
  :root { --space-section: 64px; }
  body { font-size: 17px; }

  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }

  .site-nav__menu {
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    background: var(--navy-dark);
    border-bottom: 1px solid var(--navy-light);
    padding: 10px 14px 18px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform .18s ease, opacity .18s ease;
  }
  .site-nav__menu.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .site-nav__links { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav__links a { padding: 12px 12px; font-size: 1.05rem; }
  .site-nav__cta { text-align: center; margin-top: 4px; }

  .card { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
