/* =========================================================
   Talverwaltung — Haus & Grund
   Design system: Blaupause / Aufteilungsplan
   ========================================================= */

:root {
  /* Brand colors */
  --navy: #1a2e4a;
  --navy-ink: #12202f;
  --navy-soft: #24405f;
  --beige: #ece7e1;
  --beige-deep: #ddd5c8;
  --white: #ffffff;
  --moss: #45573f;
  --moss-soft: #5c7154;
  --slate: #495868;
  --line: rgba(26, 46, 74, 0.14);
  --line-soft: rgba(26, 46, 74, 0.08);

  /* Surfaces */
  --bg-page: var(--white);
  --bg-alt: var(--beige);

  /* Type */
  --font-display: 'Fraunces', 'Iowan Old Style', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: 1.25rem;
  --text-xl: 1.625rem;
  --text-2xl: 2.25rem;
  --text-3xl: 3.25rem;
  --text-4xl: 4.25rem;

  /* Spacing */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --space-7: 7rem;

  --container-w: 1180px;
  --radius: 2px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@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;
    scroll-behavior: auto !important;
  }
}
body {
  margin: 0;
  padding-top: 96px;
  background: var(--bg-page);
  color: var(--navy-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure { margin: 0; }
button { font: inherit; cursor: pointer; }
svg { display: block; }

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

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--space-3);
}
@media (min-width: 640px) {
  .container { padding-inline: var(--space-4); }
}

.section { padding-block: var(--space-6); }
.section--tight { padding-block: var(--space-5); }
.section--beige { background: var(--bg-alt); }
.section--navy { background: var(--navy); color: var(--beige); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--moss);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: var(--space-2);
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: currentColor;
  display: inline-block;
}
.section--navy .eyebrow { color: var(--beige-deep); }

h1, .h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 4.4vw + 1rem, var(--text-4xl));
  line-height: 1.06;
  letter-spacing: -0.01em;
  color: var(--navy);
}
h2, .h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 2.4vw + 1rem, var(--text-3xl));
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: var(--navy);
}
h3, .h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
  line-height: 1.3;
  color: var(--navy);
}
.section--navy h1, .section--navy h2, .section--navy h3 { color: var(--white); }

.lede {
  font-size: var(--text-lg);
  line-height: 1.55;
  color: var(--slate);
  max-width: 46ch;
}
.section--navy .lede { color: rgba(236, 231, 225, 0.8); }

.prose p + p { margin-top: 1.1em; }
.prose { color: var(--navy-ink); }
.prose .lede { max-width: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.95em 1.7em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease), background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--navy);
  color: var(--white);
}
.btn-primary:hover { background: var(--navy-soft); }
.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--line);
}
.btn-outline:hover { border-color: var(--navy); }
.section--navy .btn-outline {
  color: var(--white);
  border-color: rgba(236, 231, 225, 0.35);
}
.section--navy .btn-outline:hover { border-color: var(--white); }
.btn-accent { background: var(--moss); color: var(--white); }
.btn-accent:hover { background: var(--moss-soft); }
.btn svg { width: 16px; height: 16px; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 250;
  background: rgba(236, 231, 225, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.05rem;
  gap: var(--space-3);
}
.brand { display: flex; align-items: center; margin-left: -6.7rem; }
.brand img { height: 60px; width: auto; }

.nav-desktop {
  display: none;
}
@media (min-width: 980px) {
  .nav-desktop {
    display: flex;
    align-items: center;
    gap: var(--space-4);
  }
}
.nav-desktop a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--navy-ink);
  position: relative;
  padding-block: 0.3rem;
}
.nav-desktop a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--moss);
  transition: right 0.3s var(--ease);
}
.nav-desktop a:hover::after,
.nav-desktop a[aria-current="page"]::after { right: 0; }
.nav-desktop a[aria-current="page"] { color: var(--navy); }

.header-actions { display: flex; align-items: center; gap: var(--space-2); }
.header-actions .btn { padding: 0.7em 1.35em; }
.header-actions .btn-primary { display: none; }
@media (min-width: 640px) {
  .header-actions .btn-primary { display: inline-flex; }
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--navy);
}
@media (min-width: 980px) {
  .nav-toggle { display: none; }
}
.nav-toggle svg { width: 18px; height: 18px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  top: 0;
  background: var(--beige);
  z-index: 200;
  padding: 6rem var(--space-3) var(--space-4);
  overflow-y: auto;
  width: 100vw;
  height: 100vh;
}
.nav-mobile.is-open { display: block; }
.nav-mobile a {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
}
.nav-mobile .header-actions {
  margin-top: var(--space-3);
}
@media (min-width: 980px) {
  .nav-mobile { display: none !important; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: var(--space-6) var(--space-5);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  gap: var(--space-5);
  align-items: center;
  justify-items: center;
  text-align: center;
  max-width: 760px;
  margin-inline: auto;
}
.hero .btn-row {
  justify-content: center;
}
.hero .lede {
  margin-inline: auto;
}

.hero h1 { margin-bottom: var(--space-3); }
.hero .lede { margin-bottom: var(--space-4); }
.hero__figure {
  background: var(--bg-alt);
  border-radius: var(--radius);
  padding: var(--space-4);
  position: relative;
}
.hero__figure svg { width: 100%; height: auto; }
.hero__caption {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--slate);
  letter-spacing: 0.04em;
  margin-top: var(--space-2);
  display: flex;
  justify-content: space-between;
}

/* blueprint diagram strokes */
.blueprint-line { stroke: var(--navy); fill: none; stroke-width: 1.5; }
.blueprint-line--soft { stroke: var(--slate); opacity: 0.55; }
.blueprint-fill { fill: var(--moss); opacity: 0.14; }
.blueprint-fill--strong { fill: var(--moss); opacity: 0.26; }
.blueprint-dim { stroke: var(--slate); stroke-width: 1; opacity: 0.5; }
.blueprint-dot { fill: var(--moss); }
.blueprint-label { font-family: var(--font-mono); font-size: 9px; fill: var(--slate); }

/* ---------- Page header (interior pages) ---------- */
.page-header {
  padding-block: var(--space-6) var(--space-5);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
}
.breadcrumb {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  color: var(--slate);
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}
.breadcrumb a { color: var(--slate); border-bottom: 1px solid var(--line); }
.breadcrumb a:hover { color: var(--navy); }
.page-header h1 { max-width: 18ch; }
.page-header .lede { margin-top: var(--space-2); }

/* ---------- Cards / Leistungen ---------- */
.card-grid {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-5);
}
@media (min-width: 760px) {
  .card-grid--2 { grid-template-columns: repeat(2, 1fr); }
  .card-grid--3 { grid-template-columns: repeat(3, 1fr); }
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: border-color 0.3s ease, transform 0.3s var(--ease);
}
.card:hover { border-color: var(--navy); transform: translateY(-3px); }
.card__icon { width: 44px; height: 44px; color: var(--navy); }
.card__icon svg { width: 100%; height: 100%; }
.card h3 { margin-top: var(--space-1); }
.card p { color: var(--slate); font-size: var(--text-sm); }
.card .link-arrow { margin-top: auto; padding-top: var(--space-2); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--navy);
}
.link-arrow svg { width: 15px; height: 15px; transition: transform 0.3s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Feature list (services detail pages) ---------- */
.feature-list {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-5);
}
@media (min-width: 760px) {
  .feature-list { grid-template-columns: repeat(2, 1fr); }
}
.feature-item { display: flex; gap: var(--space-2); }
.feature-item__icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  color: var(--moss);
}
.feature-item__icon svg { width: 100%; height: 100%; }
.feature-item h3 { font-size: var(--text-lg); margin-bottom: 0.3em; }
.feature-item p { color: var(--slate); font-size: var(--text-sm); }

/* ---------- Values / Werte ---------- */
.values-grid {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-5);
}
@media (min-width: 760px) {
  .values-grid { grid-template-columns: repeat(3, 1fr); }
}
.value-item {
  border-top: 2px solid var(--navy);
  padding-top: var(--space-2);
}

/* ---------- Quote / philosophy band ---------- */
.quote-band { text-align: center; }
.quote-band blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.4rem, 2vw + 1rem, 2.1rem);
  line-height: 1.4;
  max-width: 22ch;
  margin-inline: auto;
  color: var(--navy);
}
.section--navy .quote-band blockquote { color: var(--white); }
.quote-band cite {
  display: block;
  font-style: normal;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate);
  margin-top: var(--space-3);
}

/* ---------- Split section (text + figure) ---------- */
.split {
  display: grid;
  gap: var(--space-5);
  align-items: center;
}
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split--reverse .split__figure { order: 2; }
}
.split__figure {
  background: var(--bg-alt);
  padding: var(--space-4);
}
.split__figure svg { width: 100%; height: auto; }

/* ---------- CTA band ---------- */
.cta-band {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
  justify-content: space-between;
}
.cta-band h2 { max-width: 16ch; }

/* ---------- Callout box (Impressum/Karriere notices) ---------- */
.callout {
  background: var(--bg-alt);
  border-left: 3px solid var(--moss);
  padding: var(--space-3) var(--space-4);
  margin-block: var(--space-4);
}
.callout p { margin: 0; }
.callout p + p { margin-top: 0.8em; }
.callout--placeholder {
  border-left-color: var(--slate);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--slate);
}

/* ---------- Legal pages ---------- */
.legal { max-width: 72ch; }
.legal h2, .legal h3 { font-size: var(--text-lg); margin-top: var(--space-5); margin-bottom: var(--space-2); }
.legal h2:first-of-type, .legal h3:first-of-type { margin-top: var(--space-3); }
.legal p, .legal li { color: var(--navy-ink); }
.legal p + p { margin-top: 1em; }
.legal ul { margin-top: 0.8em; }
.legal li { padding-left: 1.2em; position: relative; margin-bottom: 0.5em; }
.legal li::before {
  content: '–';
  position: absolute; left: 0;
  color: var(--slate);
}
.legal a { text-decoration: underline; text-underline-offset: 2px; }
.legal table { border-collapse: collapse; width: 100%; margin-top: 1em; font-size: var(--text-sm); }
.legal td { padding: 0.5em 0.8em 0.5em 0; vertical-align: top; border-bottom: 1px solid var(--line); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: rgba(236, 231, 225, 0.85);
  padding-block: var(--space-5) var(--space-3);
}
.footer-grid {
  display: grid;
  gap: var(--space-4);
  align-items: start;
  padding-bottom: var(--space-5);
  border-bottom: 1px solid rgba(236, 231, 225, 0.15);
}

@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.footer-brand img { height: 56px; margin-bottom: 0; }
.footer-brand p { max-width: 34ch; font-size: var(--text-sm); color: rgba(236, 231, 225, 0.65); }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(236, 231, 225, 0.5);
  margin-bottom: var(--space-2);
}
.footer-col a, .footer-col address { display: block; font-style: normal; }
.footer-col li { margin-bottom: 0.55em; font-size: var(--text-sm); }
.footer-col a:hover { color: var(--white); }
.footer-col address { font-size: var(--text-sm); line-height: 1.7; color: rgba(236, 231, 225, 0.85); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-3);
  font-size: var(--text-xs);
  color: rgba(236, 231, 225, 0.5);
}
.footer-bottom nav { display: flex; gap: var(--space-3); }
.footer-bottom a:hover { color: var(--white); }

/* ---------- Reveal-on-scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- Prose column ---------- */
.prose-col { max-width: 60ch; }

/* ---------- Icon figure (decorative teaser box) ---------- */
.icon-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-4);
  text-align: center;
}
.icon-figure__icon { width: 64px; height: 64px; color: var(--navy); opacity: 0.85; }
.icon-figure__icon svg { width: 100%; height: 100%; }
.icon-figure__caption {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--slate);
}

/* ---------- Figure caption inside split figures ---------- */
.figure-caption {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--slate);
  letter-spacing: 0.04em;
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--line);
}

/* ---------- Contact rows ---------- */
.contact-row {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  margin-bottom: var(--space-3);
}
.contact-row__icon { width: 22px; height: 22px; color: var(--moss); flex-shrink: 0; margin-top: 0.15em; }
.contact-row__icon svg { width: 100%; height: 100%; }
.contact-row h4 {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 0.3em;
}
.contact-row p, .contact-row a { font-size: var(--text-sm); }
.contact-row a:hover { color: var(--moss); }

/* ---------- Related-service note ---------- */
.related-note {
  font-size: var(--text-sm);
  color: var(--slate);
  border-top: 1px solid var(--line);
  padding-top: var(--space-3);
  margin-top: var(--space-5);
}
.related-note a { font-weight: 600; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--line); border: none; margin-block: var(--space-5); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.stack { display: flex; flex-direction: column; gap: var(--space-2); }
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy);
  color: var(--white);
  padding: 0.8em 1.2em;
  z-index: 200;
}
.skip-link:focus { left: var(--space-2); top: var(--space-2); }

.nav-mobile { position: fixed; }
.nav-mobile__close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--navy);
  z-index: 1;
}
.nav-mobile__close svg { width: 18px; height: 18px; }
