/* =============================================
   Westerwald Betreuung – Design System
   Palette: Nachtblau + Salbei + Warmgrau
   Fonts: Figtree (headings) + DM Sans (body, self-hosted)
   ============================================= */

@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/dmsans-italic-400.ttf') format('truetype');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../assets/fonts/dmsans-normal-300.ttf') format('truetype');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/dmsans-normal-400.ttf') format('truetype');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/dmsans-normal-500.ttf') format('truetype');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/dmsans-normal-600.ttf') format('truetype');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/dmsans-normal-700.ttf') format('truetype');
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../assets/fonts/figtree-normal-300.ttf') format('truetype');
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/figtree-normal-400.ttf') format('truetype');
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/figtree-normal-500.ttf') format('truetype');
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../assets/fonts/figtree-normal-600.ttf') format('truetype');
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/figtree-normal-700.ttf') format('truetype');
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../assets/fonts/figtree-normal-800.ttf') format('truetype');
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url('../assets/fonts/figtree-normal-900.ttf') format('truetype');
}

:root {
  /* ── Core palette ── */
  --night:       oklch(22% 0.04 250);   /* tiefes Nachtblau */
  --night-dim:   oklch(30% 0.04 250);
  --sage:        oklch(56% 0.09 158);   /* Salbeigrün */
  --sage-light:  oklch(92% 0.04 158);   /* Salbei hell */
  --sage-mid:    oklch(75% 0.07 158);
  --warm:        oklch(68% 0.10 55);    /* warmes Bernstein */
  --warm-light:  oklch(94% 0.04 55);

  /* ── Neutrals ── */
  --stone-100:   oklch(97% 0.005 250);
  --stone-200:   oklch(93% 0.008 250);
  --stone-300:   oklch(87% 0.010 250);
  --stone-400:   oklch(72% 0.012 250);
  --stone-500:   oklch(55% 0.014 250);
  --stone-600:   oklch(42% 0.014 250);
  --stone-700:   oklch(30% 0.016 250);

  /* ── Semantic ── */
  --bg:          #f2f2f2;
  --surface:     #ffffff;
  --border:      oklch(90% 0.008 250);
  --border-dark: oklch(80% 0.010 250);
  --text:        var(--stone-700);
  --text-muted:  var(--stone-500);
  --text-light:  var(--stone-400);

  /* ── Typography ── */
  --font-head:   'Figtree', system-ui, sans-serif;
  --font-body:   'DM Sans', system-ui, sans-serif;

  /* ── Layout ── */
  --max-w:       1200px;
  --header-h:    72px;

  /* ── Radius ── */
  --r-sm:   6px;
  --r-md:  12px;
  --r-lg:  20px;
  --r-xl:  32px;

  /* ── Shadows ── */
  --sh-xs: 0 1px 3px oklch(0% 0 0 / .06);
  --sh-sm: 0 2px 8px oklch(0% 0 0 / .08);
  --sh-md: 0 8px 24px oklch(0% 0 0 / .10);
  --sh-lg: 0 20px 48px oklch(0% 0 0 / .12);

  /* ── Transitions ── */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --t:    .22s var(--ease);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--night);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.02em;
  text-wrap: balance;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ── Layout ── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.5rem;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: var(--t);
  white-space: nowrap;
  letter-spacing: -.01em;
}
.btn-sm { padding: .55rem 1.1rem; font-size: .88rem; border-radius: 999px; }
.btn-primary {
  background: var(--night);
  color: white;
  border-color: var(--night);
}
.btn-primary:hover {
  background: var(--night-dim);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px oklch(22% 0.04 250 / .25);
}
.btn-sage {
  background: var(--sage);
  color: white;
  border-color: var(--sage);
}
.btn-sage:hover {
  background: oklch(50% 0.09 158);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--night);
  border-color: var(--border-dark);
}
.btn-outline:hover {
  border-color: var(--night);
  background: var(--stone-100);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--stone-200); }

/* ── Section label ── */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--font-head);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 1.25rem;
}
.section-eyebrow::before {
  content: '';
  display: inline-block;
  width: 20px; height: 2px;
  background: var(--sage);
  border-radius: 2px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
  letter-spacing: -.03em;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 58ch;
  text-wrap: pretty;
}

/* ── Header ── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: oklch(100% 0 0 / .92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 900;
  display: flex;
  align-items: center;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-grow: 1;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--night);
  letter-spacing: -.02em;
  flex-shrink: 0;
}
.site-logo img { height: 30px; width: auto; }
.site-logo img.brand-logo-inline,
.brand img.brand-logo-inline { height: 26px; width: auto; display: block; }
.site-logo .logo-accent { color: var(--sage); }

.header-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.header-nav a {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: .9rem;
  color: var(--stone-600);
  padding: .45rem .85rem;
  border-radius: var(--r-sm);
  transition: var(--t);
}
.header-nav a:hover,
.header-nav a.active {
  color: var(--night);
  background: var(--stone-200);
}

.header-actions { display: flex; align-items: center; gap: .75rem; }

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  color: var(--night);
}

/* ── Page header (subpages) ── */
.page-hero {
  padding: calc(var(--header-h) + 4rem) 0 3.5rem;
  background: var(--night);
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 90% 50%, oklch(56% 0.09 158 / .18), transparent 60%);
  pointer-events: none;
}
.page-hero > * { position: relative; z-index: 1; }
.page-hero .eyebrow { color: var(--sage-mid); }
.page-hero .eyebrow::before { background: var(--sage-mid); }
.page-hero h1 { color: white; font-size: clamp(2.5rem, 5vw, 4rem); }
.page-hero .lead { color: oklch(100% 0 0 / .65); font-size: 1.15rem; max-width: 55ch; margin-top: .75rem; }
.breadcrumb {
  display: flex; gap: .5rem; align-items: center;
  font-size: .82rem; color: oklch(100% 0 0 / .45);
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: oklch(100% 0 0 / .7); }
.breadcrumb a:hover { color: white; }
.breadcrumb span { opacity: .4; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 2rem;
  transition: var(--t);
}
.card:hover {
  border-color: var(--border-dark);
  box-shadow: var(--sh-sm);
  transform: translateY(-2px);
}

/* ── Icon box ── */
.icon-box {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.icon-box-sage { background: var(--sage-light); color: var(--sage); }
.icon-box-night { background: oklch(22% 0.04 250 / .1); color: var(--night); }
.icon-box-warm { background: var(--warm-light); color: var(--warm); }

/* ── Forms ── */
.form-field { display: flex; flex-direction: column; gap: .4rem; }
.form-field label {
  font-family: var(--font-head);
  font-size: .85rem;
  font-weight: 600;
  color: var(--stone-700);
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: .7rem 1rem;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--text);
  background: var(--surface);
  transition: var(--t);
  appearance: none;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--sage);
  box-shadow: 0 0 0 3px oklch(56% 0.09 158 / .12);
}
.form-field textarea { resize: vertical; min-height: 110px; }

/* ── Footer ── */
.site-footer {
  background: var(--night);
  color: oklch(100% 0 0 / .6);
  padding: 5rem 0 2.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr repeat(3, 1fr);
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid oklch(100% 0 0 / .1);
  margin-bottom: 2rem;
}
.footer-brand .logo-wrap {
  display: flex; align-items: center; gap: .6rem;
  margin-bottom: 1.25rem;
}
.footer-brand .logo-wrap img { height: 28px; filter: brightness(0) invert(1); opacity: .9; }
.footer-brand .logo-wrap img.brand-logo-inline-footer,
.brand img.brand-logo-inline-footer { height: 26px; filter: none; opacity: 1; }
.footer-brand .logo-wrap span {
  font-family: var(--font-head);
  font-weight: 800;
  color: white;
  font-size: 1rem;
}
.footer-brand p { font-size: .9rem; line-height: 1.65; max-width: 28ch; }
.footer-col h4 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: oklch(100% 0 0 / .35);
  margin-bottom: 1.25rem;
}
.footer-col ul li + li { margin-top: .6rem; }
.footer-col ul a {
  font-size: .9rem;
  color: oklch(100% 0 0 / .55);
  transition: color .18s;
}
.footer-col ul a:hover { color: white; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .82rem;
}
.footer-bottom a { color: oklch(100% 0 0 / .45); transition: color .18s; }
.footer-bottom a:hover { color: white; }

/* ── Fade-in animations ── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }

/* ── Mobile Nav ── */
.mobile-nav {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--surface);
  z-index: 800;
  padding: 2rem;
  flex-direction: column;
  gap: .5rem;
  border-top: 1px solid var(--border);
  overflow-y: auto;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--night);
  padding: .9rem 1rem;
  border-radius: var(--r-sm);
  transition: var(--t);
}
.mobile-nav a:hover { background: var(--stone-100); }

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}

/* ── Trust badge / pill ── */
.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .9rem;
  background: var(--sage-light);
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  color: oklch(40% 0.09 158);
  font-family: var(--font-head);
}

/* ── Utility ── */
.text-muted { color: var(--text-muted); }
.text-night { color: var(--night); }
.text-sage  { color: var(--sage); }
.fw-600 { font-weight: 600; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.text-center { text-align: center; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .header-nav, .header-actions { display: none; }
  .mobile-toggle { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .container { padding: 0 1.25rem; }
  .footer-grid { grid-template-columns: 1fr; }
}
