/* ==========================================================================
   Börmann Unternehmensgruppe – Website
   Farben, Schriften und Abstände als Variablen; Details siehe branding/corporate-design.html
   ========================================================================== */

@font-face {
  font-family: 'Source Serif 4';
  src: url('fonts/source-serif-4-var.woff2') format('woff2');
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('fonts/source-serif-4-var-italic.woff2') format('woff2');
  font-weight: 300 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Source Sans 3';
  src: url('fonts/source-sans-3-var.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Markenfarben */
  --nachtblau: #16202b;
  --tiefe: #111820;
  --kalk: #f6f4f0;
  --kupfer: #b8693d;

  /* Hell (Standard) */
  --bg: #f6f4f0;
  --surface: #fdfcfa;
  --surface-2: #eeebe4;
  --ink: #16202b;
  --text: #34404d;
  --muted: #5d6774;
  --line: #dcd6ca;
  --line-strong: #bdb5a6;
  --accent: #9a5530;          /* Kupfer als Schrift auf Hell */
  --accent-line: #b8693d;     /* Kupfer für Linien und Flächen */
  --band-bg: #16202b;
  --band-ink: #f6f4f0;
  --band-text: #c9cfd6;
  --band-line: #2c3846;
  --band-accent: #d08a5c;
  --btn-bg: #16202b;
  --btn-ink: #f6f4f0;

  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-sans: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 2px;
  --max: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 10vw, 140px);
  --header-h: 76px;

  color-scheme: light;
}

:root[data-theme='dark'] {
  --bg: #111820;
  --surface: #161f29;
  --surface-2: #141c25;
  --ink: #f3f1ec;
  --text: #cdd3da;
  --muted: #9aa4b1;
  --line: #27313d;
  --line-strong: #3a4654;
  --accent: #d08a5c;
  --accent-line: #b8693d;
  --band-bg: #0b1016;
  --band-ink: #f3f1ec;
  --band-text: #b9c1ca;
  --band-line: #222c38;
  --band-accent: #d08a5c;
  --btn-bg: #f3f1ec;
  --btn-ink: #111820;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #111820;
    --surface: #161f29;
    --surface-2: #141c25;
    --ink: #f3f1ec;
    --text: #cdd3da;
    --muted: #9aa4b1;
    --line: #27313d;
    --line-strong: #3a4654;
    --accent: #d08a5c;
    --accent-line: #b8693d;
    --band-bg: #0b1016;
    --band-ink: #f3f1ec;
    --band-text: #b9c1ca;
    --band-line: #222c38;
    --band-accent: #d08a5c;
    --btn-bg: #f3f1ec;
    --btn-ink: #111820;
    color-scheme: dark;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'kern', 'liga';
}

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

a {
  color: inherit;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

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

::selection {
  background: color-mix(in srgb, var(--accent-line) 30%, transparent);
  color: var(--ink);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  color: var(--ink);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}

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

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.sr-only {
  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;
  left: var(--gutter);
  top: -60px;
  z-index: 100;
  background: var(--btn-bg);
  color: var(--btn-ink);
  padding: 10px 16px;
  border-radius: var(--radius);
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}

/* --------------------------------------------------------------- Kopfzeile */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: block;
  color: var(--ink);
  flex: none;
  margin-right: auto;
}
.brand:hover {
  color: var(--ink);
}
.brand svg {
  height: 40px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding: 10px 14px;
  border-radius: var(--radius);
}
.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--ink);
}

.icon-btn {
  appearance: none;
  -webkit-appearance: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  margin: 0;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
  flex: none;
}
.icon-btn:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* Sonne im Dunkelmodus, Mond im Hellmodus */
.theme-toggle .i-sun {
  display: none;
}
:root[data-theme='dark'] .theme-toggle .i-sun {
  display: block;
}
:root[data-theme='dark'] .theme-toggle .i-moon {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme-toggle .i-sun {
    display: block;
  }
  :root:not([data-theme='light']) .theme-toggle .i-moon {
    display: none;
  }
}

.nav-toggle {
  display: none;
}

@media (max-width: 860px) {
  :root {
    --header-h: 64px;
  }
  .brand svg {
    height: 34px;
  }
  .nav-toggle {
    display: grid;
  }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .site-header.is-open .nav {
    display: flex;
  }
  .nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-size: 0.875rem;
  }
  .nav a:last-child {
    border-bottom: 0;
  }
  .header-inner {
    gap: 10px;
  }
}

@media (max-width: 380px) {
  .brand svg {
    height: 28px;
  }
}

/* --------------------------------------------------------------- Bausteine */
.label {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  line-height: 1.6;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 22px;
}
.label::before {
  content: '';
  width: 28px;
  height: 1px;
  margin-top: 0.8em;
  background: var(--accent-line);
  flex: none;
}
.label .num {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-ink);
}
.btn-primary:hover {
  background: var(--accent-line);
  color: #fff;
}
.btn-ghost {
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  color: var(--ink);
  border-color: var(--ink);
}
.btn .arrow {
  transition: transform 0.15s ease;
}
.btn:hover .arrow {
  transform: translateX(3px);
}

.section {
  padding: var(--section) 0;
}
.section + .section {
  border-top: 1px solid var(--line);
}
.section--tint {
  background: var(--surface-2);
}

.section-head {
  max-width: 760px;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section-head h2 {
  font-size: clamp(2rem, 4.2vw, 3.25rem);
}
.section-head .intro {
  margin-top: 22px;
  font-size: 1.1875rem;
  color: var(--muted);
  max-width: 640px;
}

/* --------------------------------------------------------------- Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 9vw, 120px) 0 clamp(64px, 10vw, 140px);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.02em;
}
.hero h1 em {
  display: block;
  font-style: italic;
  font-weight: 300;
  color: var(--muted);
}

.hero .lead {
  margin: 32px 0 40px;
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.6;
  max-width: 34em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-mark {
  margin: 0;
  color: var(--ink);
  justify-self: end;
  width: 100%;
  max-width: 440px;
}
.hero-mark .construct {
  stroke: var(--accent-line);
  stroke-width: 1px;
  fill: none;
  vector-effect: non-scaling-stroke;
  opacity: 0.45;
}
.hero-mark .construct--dash {
  stroke-dasharray: 3 4;
}
.hero-mark .dim {
  stroke: var(--muted);
  stroke-width: 1px;
  vector-effect: non-scaling-stroke;
  opacity: 0.7;
}
.hero-mark text {
  font-family: var(--font-sans);
  font-size: 4.2px;
  font-weight: 600;
  letter-spacing: 0.08em;
  fill: var(--muted);
}

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-mark {
    order: -1;
    justify-self: start;
    max-width: 200px;
  }
  .hero-mark text,
  .hero-mark .dim {
    display: none;
  }
}

/* --------------------------------------------------------------- Die Gruppe */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px);
}
.split .section-head {
  margin-bottom: 0;
}
.prose p {
  font-size: 1.1875rem;
  line-height: 1.7;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
  margin: clamp(56px, 8vw, 96px) 0 0;
  padding: 0;
  list-style: none;
}
.facts li {
  border-top: 1px solid var(--ink);
  padding-top: 22px;
}
.facts h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}
.facts p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 860px) {
  .split,
  .facts {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------- Unternehmen */
.org-root {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0;
}
.org-root .node {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border: 1px solid var(--ink);
  background: var(--bg);
  border-radius: var(--radius);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
}
.org-root .node svg {
  width: 20px;
  height: 20px;
}
.org-root .stem {
  width: 1px;
  height: 32px;
  background: var(--line-strong);
}

.companies {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding-top: 32px;
}
/* Verbindungslinien vom Dach zu den Gesellschaften */
.companies::before {
  content: '';
  position: absolute;
  top: 0;
  left: calc((100% - 48px) / 6);
  right: calc((100% - 48px) / 6);
  height: 1px;
  background: var(--line-strong);
}
.company {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 36px);
  min-height: 100%;
}
.company::before {
  content: '';
  position: absolute;
  top: -33px;
  left: 50%;
  width: 1px;
  height: 32px;
  background: var(--line-strong);
}
.company--planned {
  background: transparent;
  border-style: dashed;
  border-color: var(--line-strong);
}
.company--planned::before {
  background: repeating-linear-gradient(to bottom, var(--line-strong) 0 4px, transparent 4px 8px);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
}
.status::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid var(--accent-line);
}
.status--active::before {
  background: var(--accent-line);
}

.company-logo {
  height: 64px;
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  color: var(--ink);
}
.company-logo svg {
  height: 100%;
  width: auto;
}
.company-logo--mark svg {
  height: 48px;
}
.company h3 {
  font-size: 1.625rem;
  margin-bottom: 6px;
}
.company .role {
  font-size: 0.9375rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 18px;
}
.company p {
  color: var(--muted);
}
.tags {
  list-style: none;
  padding: 0;
  margin: auto 0 0;
  padding-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tags li {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 9px;
}
.company .more {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  display: inline-flex;
  gap: 8px;
  color: var(--ink);
}
.company .more:hover {
  color: var(--accent);
}

@media (max-width: 960px) {
  .companies {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-top: 0;
  }
  .companies::before,
  .company::before,
  .org-root {
    display: none;
  }
}

/* --------------------------------------------------------------- Arbeitsfelder */
.fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-strong);
}
.fields li {
  padding: 32px 28px 8px 0;
}
.fields li + li {
  padding-left: 28px;
  border-left: 1px solid var(--line);
}
.fields .num {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--accent);
  margin-bottom: 36px;
  font-variant-numeric: lining-nums tabular-nums;
}
.fields h3 {
  font-size: 1.375rem;
  margin-bottom: 12px;
}
.fields p {
  color: var(--muted);
  font-size: 1rem;
}

@media (max-width: 960px) {
  .fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .fields li:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
  .fields li:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}
@media (max-width: 560px) {
  .fields {
    grid-template-columns: 1fr;
  }
  .fields li,
  .fields li + li {
    padding: 28px 0 4px;
    border-left: 0;
  }
  .fields li + li {
    border-top: 1px solid var(--line);
  }
  .fields .num {
    margin-bottom: 14px;
  }
}

/* --------------------------------------------------------------- Grundsätze (dunkles Band) */
.band {
  position: relative;
  overflow: hidden;
  background: var(--band-bg);
  color: var(--band-text);
  padding: var(--section) 0;
}
.band h2,
.band h3 {
  color: var(--band-ink);
}
.band .label {
  color: var(--band-text);
}
.band .label .num {
  color: var(--band-accent);
}
.band-mark {
  position: absolute;
  right: -6vw;
  top: 50%;
  transform: translateY(-50%);
  width: min(52vw, 640px);
  color: var(--band-ink);
  opacity: 0.035;
  pointer-events: none;
}
.band .wrap {
  position: relative;
}

.principles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(32px, 6vw, 96px);
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: p;
}
.principles li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 8px;
  padding: 32px 0;
  border-top: 1px solid var(--band-line);
}
.principles .roman {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.75rem;
  line-height: 1.1;
  color: var(--band-accent);
}
.principles h3 {
  font-size: 1.625rem;
  margin-bottom: 10px;
}
.principles p {
  margin: 0;
}

@media (max-width: 760px) {
  .principles {
    grid-template-columns: 1fr;
  }
  .principles li {
    grid-template-columns: 48px 1fr;
  }
}

/* --------------------------------------------------------------- Kontakt */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.contact .section-head {
  margin-bottom: 32px;
}
.contact-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 40px);
  margin: 0;
}
.contact-card dt {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.contact-card dd {
  margin: 0 0 26px;
  color: var(--ink);
  font-size: 1.125rem;
}
.contact-card dd:last-child {
  margin-bottom: 0;
}
.contact-card address {
  font-style: normal;
}

@media (max-width: 860px) {
  .contact {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------- Rechtstexte */
.legal {
  padding: clamp(48px, 8vw, 96px) 0 var(--section);
}
.legal .wrap {
  max-width: 820px;
}
.legal h1 {
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  margin-bottom: 28px;
}
.legal h2 {
  font-size: 1.5rem;
  margin: 48px 0 14px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.legal .lead {
  font-size: 1.1875rem;
  color: var(--muted);
}
.legal address {
  font-style: normal;
}
.legal .after-address {
  margin-top: 1em;
}

.notfound {
  min-height: 60vh;
  display: grid;
  align-content: center;
  padding: var(--section) 0;
}
.notfound h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  margin-bottom: 18px;
}
.notfound p {
  color: var(--muted);
  margin-bottom: 32px;
}

/* --------------------------------------------------------------- Fußzeile */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 40px;
  font-size: 0.9375rem;
  color: var(--muted);
}
.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px 48px;
  align-items: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
}
.footer-brand svg {
  width: 32px;
  height: 32px;
}
.footer-brand span {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: center;
}
.footer-nav a {
  text-decoration: none;
}
.footer-copy {
  margin: 0;
}

@media (max-width: 760px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .footer-nav {
    justify-content: flex-start;
  }
}

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

@media print {
  .site-header,
  .site-footer,
  .theme-toggle,
  .nav-toggle,
  .band-mark,
  .hero-mark {
    display: none !important;
  }
  .band {
    background: none;
    color: #000;
  }
  body {
    background: #fff;
    color: #000;
  }
}
