/* ==========================================================================
   5A Holding OnePager
   Farbwelt aus dem Logo: Blau primär, Grün sekundär, Violett als kleiner
   Tertiärakzent. Heller Auftritt auf Weiß, Schrift Geist (selbst gehostet).
   ========================================================================== */

/* ---- Fonts ---- */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/geist-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: "Geist";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/geist-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;
}

/* ---- Tokens ---- */
:root {
  --blue: #0c6ba9;
  --blue-deep: #0a5c92;
  --blue-tint: #eef5fa;
  --green: #40a748;
  --green-deep: #2e7d35;
  --purple: #752d82;

  --ink: #14212e;
  --body: #43525f;
  --muted: #67737e;
  --bg: #ffffff;
  --surface: #f3f7fa;
  --line: #e3eaef;

  --ph-bg: #fff3c2;
  --ph-line: #b98d00;
  --rel-bg: #f5ecf7;
  --rel-line: #752d82;

  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 22px;

  --w-page: 1200px;
  --pad-x: clamp(1.25rem, 4vw, 2.5rem);
  --header-h: 72px;

  --shadow-soft: 0 10px 30px -12px rgba(12, 60, 96, 0.18);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Base ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body {
  margin: 0;
  font-family: "Geist", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.6em;
}
h1 {
  font-size: clamp(2.5rem, 6vw, 4.1rem);
  letter-spacing: -0.035em;
  line-height: 1.04;
}
h2 {
  font-size: clamp(1.85rem, 3.6vw, 2.55rem);
  letter-spacing: -0.025em;
}
h3 {
  font-size: 1.4rem;
  letter-spacing: -0.015em;
}
p {
  margin: 0 0 1.1em;
  max-width: 65ch;
}
a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--blue-deep);
}
img,
svg {
  max-width: 100%;
  height: auto;
}
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 2px;
}
::selection {
  background: #cfe4f2;
}

.wrap {
  max-width: var(--w-page);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-s) 0;
}
.skip-link:focus-visible {
  left: 0;
}

/* ---- Entwurfshinweis (vor Livegang komplett entfernen) ---- */
.draft-note {
  background: #fdf6e0;
  border-bottom: 1px solid #eadfb8;
  font-size: 0.85rem;
  color: #6b5a1c;
  padding: 0.55rem 0;
}
.draft-note .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  align-items: center;
}
.draft-note .swatch {
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  border-radius: 3px;
  margin-right: 0.4em;
  vertical-align: -0.08em;
}
.draft-note .swatch.s-ph {
  background: var(--ph-bg);
  border: 1px solid var(--ph-line);
}
.draft-note .swatch.s-rel {
  background: var(--rel-bg);
  border: 1px solid var(--rel-line);
}

/* ---- Platzhalter- und Freigabe-Markierungen (Entwurf) ---- */
.ph {
  background: var(--ph-bg);
  border-bottom: 1px dashed var(--ph-line);
  border-radius: 3px;
  padding: 0 0.28em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.rel {
  background: var(--rel-bg);
  border-bottom: 1px dashed var(--rel-line);
  border-radius: 3px;
  padding: 0 0.28em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.rel-block {
  border-left: 3px solid var(--rel-line);
  background: linear-gradient(90deg, var(--rel-bg), transparent 70%);
  padding: 0.35rem 0.9rem 0.35rem 1rem;
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease-out);
}
.site-header.scrolled {
  border-bottom-color: var(--line);
}
.site-header .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}
.brand svg,
.brand img {
  width: 46px;
  height: auto;
  display: block;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.1rem);
}
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 500;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.25s var(--ease-out), color 0.25s var(--ease-out);
}
.site-nav a:hover {
  color: var(--blue);
  border-bottom-color: var(--blue);
}
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 0.5rem 0.6rem;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle svg {
  display: block;
  width: 20px;
  height: 20px;
}

@media (max-width: 820px) {
  .nav-toggle {
    display: block;
  }
  .site-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    padding: 0.5rem var(--pad-x) 1rem;
    display: none;
  }
  .site-nav.open {
    display: flex;
  }
  .site-nav a {
    padding: 0.8rem 0.25rem;
    border-bottom: 1px solid var(--line);
    font-size: 1.05rem;
  }
  /* Ohne JS bleibt die Navigation sichtbar unter der Kopfzeile */
  html:not(.js) .nav-toggle {
    display: none;
  }
  html:not(.js) .site-nav {
    position: static;
    display: flex;
    width: 100%;
    box-shadow: none;
    border-bottom: 0;
    padding: 0 0 0.75rem;
  }
  html:not(.js) .site-header {
    height: auto;
  }
  html:not(.js) .site-header .wrap {
    height: auto;
    flex-wrap: wrap;
    padding-block: 0.6rem;
  }
}

/* ---- Sections ---- */
.section {
  padding-block: clamp(4.25rem, 9vw, 7.25rem);
}
.section-head {
  max-width: 65ch;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(4.5rem, 10vw, 8rem) clamp(4.5rem, 9vw, 7rem);
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 46rem;
}
.hero p.lead {
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  line-height: 1.65;
  max-width: 58ch;
  margin-bottom: 2rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--blue);
  color: #fff;
  font-weight: 550;
  font-size: 1.02rem;
  text-decoration: none;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-s);
  transition: background 0.25s var(--ease-out), transform 0.15s var(--ease-out),
    box-shadow 0.25s var(--ease-out);
}
.btn:hover {
  background: var(--blue-deep);
  color: #fff;
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}
.btn:active {
  transform: scale(0.98);
}
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 550;
  text-decoration: none;
}
.link-arrow svg {
  width: 1em;
  height: 1em;
  transition: transform 0.25s var(--ease-out);
}
.link-arrow:hover svg {
  transform: translateX(3px);
}

/* Logo-Formen als Deko, nur Zierde, nie Inhalt */
.decor {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}
.decor-hero-logo {
  right: -8vw;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(34rem, 60vw, 58rem);
  opacity: 0.12;
}
.decor-contact-logo {
  left: -6rem;
  bottom: -5rem;
  width: clamp(24rem, 40vw, 38rem);
  opacity: 0.12;
}
@media (max-width: 940px) {
  .decor-hero-logo {
    width: 36rem;
    right: -16rem;
    opacity: 0.09;
  }
}

/* Kleine Logo-Bogen-Marker für die drei Bereiche */
.mark {
  display: inline-block;
  width: 30px;
  height: 18px;
  flex: none;
}
.mark svg {
  display: block;
  width: 100%;
  height: 100%;
}
.mark-blue {
  color: var(--blue);
}
.mark-green {
  color: var(--green);
}
.mark-purple {
  color: var(--purple);
}

/* ---- Holding: Strukturdiagramm ---- */
.org {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.org-root {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-m);
  padding: 1.1rem 2.2rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
}
.org-root .org-name {
  display: block;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.org-root .org-sub {
  display: block;
  font-size: 0.85rem;
  color: #b6c4d0;
}
.org-stem {
  width: 1px;
  height: 30px;
  background: var(--line);
}
.org-children {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  padding-top: 26px;
}
.org-children::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc((100% - 2rem) / 6);
  right: calc((100% - 2rem) / 6);
  height: 1px;
  background: var(--line);
}
.org-node {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 1.15rem 1.3rem 1.2rem;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.25s var(--ease-out), transform 0.2s var(--ease-out),
    box-shadow 0.25s var(--ease-out);
}
.org-node::before {
  content: "";
  position: absolute;
  top: -26px;
  left: 50%;
  width: 1px;
  height: 26px;
  background: var(--line);
}
.org-node:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
  color: var(--ink);
}
.org-node .org-name {
  font-weight: 600;
  font-size: 1.05rem;
}
.org-node .org-sub {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}
@media (max-width: 700px) {
  .org-children {
    grid-template-columns: 1fr;
    padding-top: 0;
    gap: 0;
  }
  .org-children::before {
    display: none;
  }
  .org-node {
    border-radius: 0;
    border: 0;
    border-left: 1px solid var(--line);
    padding: 1rem 0 1rem 1.4rem;
  }
  .org-node::before {
    display: none;
  }
  .org-node:hover {
    transform: none;
    box-shadow: none;
  }
  .org-stem {
    height: 26px;
    align-self: flex-start;
    margin-left: 1px;
  }
  .org {
    align-items: flex-start;
  }
  .org-root {
    text-align: left;
  }
}

/* ---- Gesellschaften ---- */
.units {
  border-top: 1px solid var(--line);
}
.unit {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding-block: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line);
}
.unit-head {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}
.unit-head h3 {
  margin: 0;
}
.unit-purpose {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
  max-width: 34ch;
}
.unit-body p:last-child {
  margin-bottom: 0;
}
@media (max-width: 820px) {
  .unit {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* ---- Welf Hermann ---- */
.person {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.portrait {
  max-width: 420px;
  width: 100%;
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}
.portrait img {
  display: block;
  width: 100%;
  height: auto;
}
@media (max-width: 820px) {
  .person {
    grid-template-columns: 1fr;
  }
  .portrait {
    max-width: 340px;
  }
}

/* ---- Kontakt ---- */
.contact-panel {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--radius-l);
  padding: clamp(2.5rem, 6vw, 4.5rem);
}
.contact-panel > * {
  position: relative;
  z-index: 1;
}
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.contact-intro h2 {
  margin-bottom: 0.5em;
}
.contact-intro p {
  max-width: 34ch;
  margin-bottom: 1.5rem;
}
.contact-meta {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.98rem;
  color: var(--body);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* ---- Kontaktformular ---- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.field label {
  font-size: 0.9rem;
  font-weight: 550;
  color: var(--ink);
}
.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid #c9d6e0;
  border-radius: var(--radius-s);
  padding: 0.65rem 0.8rem;
  width: 100%;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.field textarea {
  resize: vertical;
  min-height: 6.5rem;
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2343525f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6.5 8 10.5l4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.4rem;
}
.field input:hover,
.field select:hover,
.field textarea:hover {
  border-color: #9fb6c6;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(12, 107, 169, 0.15);
}
.field input:user-invalid,
.field textarea:user-invalid {
  border-color: #a8322b;
}

.field-check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--body);
}
.field-check input {
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.15rem;
  accent-color: var(--blue);
}

.contact-form .btn {
  align-self: flex-start;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 550;
}
.contact-form .btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* Honigtopf: aus dem Blickfeld, aber nicht display:none, sonst fuellen Bots ihn nicht */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin: 0;
  font-size: 0.95rem;
  border-radius: var(--radius-s);
  padding: 0.7rem 0.9rem;
}
.form-status[data-state="ok"] {
  background: #edf5ed;
  color: #2c6633;
  border: 1px solid #bcdcc0;
}
.form-status[data-state="err"] {
  background: #fbeeed;
  color: #8f2b24;
  border: 1px solid #e6c3bf;
}

@media (max-width: 820px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .contact-intro p {
    max-width: none;
  }
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: center;
  justify-content: space-between;
}
.site-footer a {
  color: var(--muted);
}
.site-footer a:hover {
  color: var(--blue-deep);
}
.footer-legal {
  display: flex;
  gap: 1.5rem;
}

/* ---- Unterseiten (Impressum, Datenschutz) ---- */
.page-main {
  max-width: 760px;
  margin-inline: auto;
  padding: clamp(3rem, 7vw, 5rem) var(--pad-x) clamp(4rem, 8vw, 6rem);
}
.page-main h1 {
  font-size: clamp(2.1rem, 4.5vw, 2.9rem);
}
.page-main h2 {
  font-size: 1.35rem;
  margin-top: 2.2em;
}
.page-main ul {
  padding-left: 1.2rem;
}
.page-main li {
  margin-bottom: 0.35em;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 2rem;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

/* ---- Scroll-Reveal (dezent, nur mit JS aktiv, respektiert reduced motion) ---- */
@media screen and (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  }
  .js .reveal.in {
    opacity: 1;
    transform: none;
  }
  .js .reveal-d1.in {
    transition-delay: 0.08s;
  }
  .js .reveal-d2.in {
    transition-delay: 0.16s;
  }
}

@media print {
  .draft-note,
  .site-header,
  .decor {
    display: none;
  }
}
