/* ============================================================
   MWPO — Projekt Organisation
   Stylesheet
   ============================================================ */

/* --- Blass-gelbe Paper-Flächen (kein Karo) --- */
.bg-paper,
section.versprechen,
section.cta,
section.prinzipien,
section.imprint {
  background: var(--c-paper) !important;
  background-image: none !important;
}
.bg-paper-soft { background: var(--c-paper-soft); }

:root {
  /* Brand Guide: #666666 ist die primaere Schriftfarbe */
  --c-ink:        #666666;   /* Brand Guide text color */
  --c-ink-soft:   #9a9a9a;
  --c-ink-strong: #2a2a2a;
  --c-heading:    #555555;   /* headings: dunkleres Grau */
  --c-paper:      #f7f1de;   /* solid blass-gelbes off-white, no grid */
  --c-paper-soft: #faf5e6;   /* lighter variant */
  --c-white:      #ffffff;

  /* Primaerer Akzent: Orange (Brand Guide RGB 255,182,0) — aber leicht gesaettigt fuer bessere Lesbarkeit */
  --c-orange:     #E8A500;   /* primary accent — headlines/wichtiges */
  --c-orange-deep:#B88000;
  --c-gold:       #E8A500;   /* legacy alias = orange */
  --c-gold-deep:  #B88000;

  /* Sparsamer Akzent: Pink (Brand Guide RGB 213,34,155) */
  --c-pink:       #D5229B;
  --c-magenta:    #D5229B;   /* legacy alias */

  /* Unbenutzt/legacy — behalten falls referenziert */
  --c-teal:       #09B0D4;
  --c-teal-deep:  #067a93;
  --c-green:      #00BA49;
  --c-lime:       #9BCB3B;
  --c-coral:      #EA4D66;
  --c-crimson:    #B82E41;

  /* Sub-Ueberschriften: mittleres Grau */
  --c-sub:        #888888;
  --c-sub-strong: #555555;

  --c-purple:     #666666;   /* legacy alias — jetzt grau */
  --c-dark:       #2a2a2a;

  /* Grid ganz ausblenden — overrides unten greifen */
  --c-grid:       transparent;
  --c-grid-ink:   transparent;
  --c-pencil:     rgba(40, 40, 40, 0.12);

  --f-sans: 'Commissioner', 'Helvetica Neue', Arial, sans-serif;
  --f-display: 'Fraunces', Georgia, 'Times New Roman', serif;

  --page-max: 1280px;
  --pad-x: clamp(20px, 5vw, 72px);

  --r-sm: 2px;
  --r-md: 4px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--c-white);
  color: var(--c-ink);
  font-family: var(--f-sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--c-purple);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: color 120ms ease;
}
a:hover { color: var(--c-magenta); }

/* --- Off-white paper surface (solid, no grid) --- */
.paper {
  background: var(--c-paper);
  background-image: none;
}
.paper-faint {
  background: var(--c-paper-soft);
  background-image: none;
}

/* --- Type --- */
h1, h2, h3, h4 {
  font-family: var(--f-sans);
  color: var(--c-purple);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  line-height: 1.08;
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 5.5vw, 78px); letter-spacing: -0.02em; }
h2 { font-size: clamp(30px, 3.2vw, 46px); }
h3 { font-size: clamp(20px, 1.5vw, 24px); }

p { margin: 0 0 1em; text-wrap: pretty; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #4a4a4a;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: #4a4a4a;
}
.eyebrow--gold { color: #4a4a4a; }
.eyebrow--gold::before { background: var(--c-gold); height: 2px; width: 32px; }

.display-underline {
  position: relative;
  display: inline;
  background-image: linear-gradient(transparent 82%, rgba(217,152,0,0.85) 82%, rgba(217,152,0,0.85) 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding: 0 0.05em;
}

.lede {
  font-size: clamp(18px, 1.35vw, 21px);
  color: var(--c-ink);
  max-width: 60ch;
  line-height: 1.55;
}

/* --- Container --- */
.wrap {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

section { padding: clamp(72px, 10vw, 128px) 0; position: relative; }

/* --- Site header --- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--pad-x);
  max-width: var(--page-max);
  margin: 0 auto;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  border-bottom: none;
  color: var(--c-ink-strong);
}
.brand img { height: 44px; width: auto; display: block; }
.brand:hover { color: var(--c-ink-strong); }

.nav {
  display: flex; gap: 32px; align-items: center;
}
.nav a {
  color: var(--c-ink);
  font-size: 15px;
  border-bottom: none;
  padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
}
.nav a:hover,
.nav a.active { color: var(--c-purple); border-bottom-color: var(--c-gold); }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.02em;
  border-radius: var(--r-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, color 120ms ease, border-color 120ms ease;
  text-decoration: none;
  line-height: 1;
}
.btn--primary {
  background: var(--c-gold);
  color: #1a1a1a;
  border-color: var(--c-gold);
}
.btn--primary:hover {
  background: #e8a500;
  border-color: #e8a500;
  color: #1a1a1a;
  transform: translateY(-1px);
}
.btn--ghost {
  background: transparent;
  color: var(--c-purple);
  border-color: var(--c-purple);
}
.btn--ghost:hover { background: var(--c-purple); color: #fff; }
/* Nav-CTA: in Orange hoovern, damit der Text nicht im grauen Text-Block verschwindet */
.nav a.nav-cta:hover,
.nav a.nav-cta.btn--ghost:hover {
  background: var(--c-orange);
  color: #1a1a1a;
  border-color: var(--c-orange);
}
.btn__arrow { transition: transform 160ms ease; }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* --- Footer --- */
.site-footer {
  border-top: 1px solid rgba(0,0,0,0.08);
  padding: 56px 0 32px;
  font-size: 14px;
  color: var(--c-ink-soft);
  background: var(--c-white);
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.site-footer h4 {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-ink-strong);
  margin-bottom: 14px;
}
.site-footer a { color: var(--c-ink); border-bottom: none; }
.site-footer a:hover { color: var(--c-purple); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer__bottom {
  display: flex; justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid rgba(0,0,0,0.06);
  font-size: 13px;
}

/* --- Numbered marker (magenta) --- */
.marker {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--c-magenta);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

/* --- Pencil line (hand-drawn feel) --- */
.pencil-line {
  height: 1px;
  background: var(--c-pencil);
  position: relative;
}
.pencil-line::before,
.pencil-line::after {
  content: ''; position: absolute; height: 1px;
  background: var(--c-pencil);
}

@media (max-width: 880px) {
  .nav { gap: 20px; }
  .nav a.nav-cta { display: none; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .nav { display: none; }
  .nav.mobile-open { display: flex; }
}

/* --- Selection: gold highlight --- */
::selection {
  background: var(--c-orange);
  color: #1a1a1a;
}

/* --- Focus ring: keyboard only, brand color, dashed --- */
:focus-visible {
  outline: 2px dashed var(--c-orange);
  outline-offset: 3px;
  border-radius: 1px;
}
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 2px dashed var(--c-orange);
  outline-offset: 4px;
}

/* --- Display-serif helper: opt-in where we want the editorial italic --- */
.display-serif {
  font-family: var(--f-display);
  font-feature-settings: "ss01", "liga";
}

/* --- Grain overlay: subtle paper texture on atmospheric sections --- */
.has-grain { position: relative; }
.has-grain::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.06;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.2  0 0 0 0 0.18  0 0 0 0 0.14  0 0 0 0.9 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
}
.has-grain > * { position: relative; z-index: 1; }

/* Apply grain automatically to all paper-toned sections */
section.versprechen,
section.marion,
.kontakt-hero,
.legal-hero,
.kontakt-form-section {
  position: relative;
  isolation: isolate;
}
section.versprechen::after,
section.marion::after,
.kontakt-hero::after,
.legal-hero::after,
.kontakt-form-section::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.2  0 0 0 0 0.18  0 0 0 0 0.14  0 0 0 0.9 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
}
section.versprechen > *,
section.marion > *,
.kontakt-hero > *,
.legal-hero > *,
.kontakt-form-section > * {
  position: relative;
  z-index: 1;
}

/* --- Section-Mark: editorialer Kapitel-Separator zwischen gleichfarbigen Sektionen --- */
.section-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  max-width: 280px;
  margin: 0 auto clamp(32px, 4vw, 56px);
  padding-top: clamp(32px, 4vw, 56px);
}
.section-mark__line {
  flex: 1 1 80px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(184,128,0,0.4), transparent);
}
.section-mark__glyph {
  flex: 0 0 auto;
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 400;
  color: var(--c-orange-deep);
  font-size: clamp(24px, 2vw, 32px);
  line-height: 1;
  user-select: none;
}

/* --- Social icon link --- */
.social-links {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  align-items: center;
}
.social-links__label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-ink-soft);
  font-weight: 600;
  margin-right: 4px;
}
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(0,0,0,0.18);
  border-radius: 50%;
  color: var(--c-ink);
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
  text-decoration: none;
}
.social-link:hover {
  color: #fff;
  background: var(--c-orange);
  border-color: var(--c-orange);
  transform: translateY(-1px);
}
.social-link svg { display: block; width: 18px; height: 18px; fill: currentColor; }

/* --- Typographic refinement on body --- */
html, body {
  font-feature-settings: "kern", "liga", "calt";
}
