/* =========================================================
   KNX & Gebäudeautomation – Stylesheet
   Keine externen Abhängigkeiten, keine Webfonts.
   ========================================================= */

:root {
  --ink: #14181d;
  --ink-soft: #3d4752;
  --muted: #68737f;
  --line: #e2ded5;
  --line-strong: #cfc9bd;
  --paper: #faf8f3;
  --surface: #ffffff;
  --accent: #0f7a4d;
  --accent-dark: #0a5b39;
  --accent-soft: #e7f2ec;
  --accent-line: #bfdccd;

  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
    "Times New Roman", serif;

  --wrap: 1120px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(20, 24, 29, 0.05);
  --shadow-md: 0 10px 30px -18px rgba(20, 24, 29, 0.35);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "kern", "liga";
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

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

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 22px;
}

.section {
  padding-block: clamp(56px, 8vw, 104px);
  border-top: 1px solid var(--line);
}

.section--tight {
  padding-block: clamp(44px, 6vw, 72px);
}

.section--surface {
  background: var(--surface);
}

.section-head {
  max-width: 720px;
  margin-bottom: clamp(30px, 4vw, 52px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 14px;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent);
}

h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
}

.section-head p {
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* ---------- Utilities ---------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  text-decoration: none;
  font-size: 0.9rem;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.site-header.is-stuck {
  border-bottom-color: var(--line);
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 96%, transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 70px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1.5px solid var(--accent);
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--surface);
}

.brand-mark svg {
  width: 20px;
  height: 20px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}

.brand-text span {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
  padding-block: 4px;
  border-bottom: 1px solid transparent;
}

.nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.nav .nav-cta {
  color: var(--surface);
  background: var(--ink);
  padding: 9px 16px;
  border-radius: 999px;
  border: 0;
  font-weight: 550;
}

.nav .nav-cta:hover {
  background: var(--accent-dark);
  color: #fff;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
}

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(44px, 7vw, 88px) clamp(48px, 7vw, 92px);
  background:
    radial-gradient(1100px 420px at 78% -10%, var(--accent-soft), transparent 70%),
    var(--paper);
}

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

.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.5rem);
  margin-bottom: 22px;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent-dark);
}

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 36em;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 0.96rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--surface);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding: 0;
  margin: 34px 0 0;
  font-size: 0.86rem;
  color: var(--muted);
}

.trust li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trust li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}

/* ---------- Hero card ---------- */

.hero-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-md);
}

.diagram {
  background: linear-gradient(180deg, #f7fbf9, #eef6f1);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  padding: 18px 14px 10px;
  margin-bottom: 18px;
}

.diagram svg {
  width: 100%;
  height: auto;
}

.facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.facts li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.facts svg {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  color: var(--accent);
}

.facts strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
}

/* ---------- Cards / Grids ---------- */

.grid {
  display: grid;
  gap: 16px;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card h3 {
  font-size: 1.18rem;
}

.card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.card-num {
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  color: var(--accent-dark);
}

.card ul {
  margin: 4px 0 0;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 0.92rem;
  display: grid;
  gap: 5px;
}

.card ul li::marker {
  color: var(--accent);
}

/* ---------- Steps ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-top: 46px;
  border-top: 1px solid var(--line-strong);
}

.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: -13px;
  left: 0;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--accent-dark);
  background: var(--paper);
  padding-right: 10px;
}

.steps h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.steps p {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.steps .meta {
  display: block;
  margin-top: 10px;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Split / About ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.prose p + p {
  margin-top: 16px;
}

.prose {
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.prose strong {
  color: var(--ink);
}

.quote {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  line-height: 1.4;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  margin: 0 0 26px;
}

.transfer {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.transfer li {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.transfer svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
  margin-top: 2px;
}

.transfer strong {
  color: var(--ink);
}

/* ---------- Interface / Abgrenzung ---------- */

.roles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.role {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--surface);
}

.role h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.05rem;
  margin-bottom: 14px;
}

.role .tag {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border: 1px solid var(--accent-line);
}

.role--partner .tag {
  background: #f1efea;
  color: var(--ink-soft);
  border-color: var(--line-strong);
}

.role ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
  font-size: 0.93rem;
  color: var(--ink-soft);
}

.role li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
}

.role li::before {
  content: "";
  width: 6px;
  height: 6px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  margin-top: 8px;
}

.role--partner li::before {
  border-color: var(--muted);
  border-radius: 1px;
}

/* ---------- Audience chips ---------- */

.chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.chips li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 16px;
  font-size: 0.93rem;
  color: var(--ink-soft);
}

.chips strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.02rem;
  margin-bottom: 4px;
}

/* ---------- Contact ---------- */

.contact {
  background: var(--ink);
  color: #eef1f4;
  border-radius: 20px;
  padding: clamp(30px, 5vw, 56px);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.contact h2 {
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.contact p {
  margin-top: 14px;
  color: #b9c2cb;
  max-width: 34em;
}

.contact .eyebrow {
  color: #7fd0a9;
}

.contact .eyebrow::before {
  background: #7fd0a9;
}

.contact-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 24px;
  display: grid;
  gap: 16px;
}

.contact-card a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 3px;
}

.contact-card a:hover {
  color: #9fe0bf;
  text-decoration-color: #9fe0bf;
}

.contact-row {
  display: grid;
  gap: 2px;
}

.contact-row span {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8d9aa6;
}

.contact-row strong {
  font-weight: 500;
  font-size: 1.02rem;
}

.contact .btn-primary {
  width: 100%;
  background: #fff;
  color: var(--ink);
}

.contact .btn-primary:hover {
  background: #d9efe3;
  color: var(--ink);
}

.contact-note {
  font-size: 0.82rem;
  color: #8d9aa6;
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 34px 40px;
  border-top: 1px solid var(--line);
  margin-top: 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--ink);
}

/* ---------- Legal pages ---------- */

.legal {
  max-width: 760px;
  padding-block: clamp(40px, 6vw, 72px);
}

.legal h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin-bottom: 26px;
}

.legal h2 {
  font-size: 1.15rem;
  margin: 30px 0 10px;
}

.legal p,
.legal li {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.legal ul {
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

.legal .hint {
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 0.9rem;
  color: var(--accent-dark);
  margin-block: 26px;
}

.placeholder {
  background: #fff3cd;
  border-bottom: 1px dashed #b58900;
  padding: 0 3px;
}

.contact .placeholder,
.contact-card .placeholder {
  background: #fff3cd;
  color: #4a3600;
  border-bottom-color: #b58900;
}

/* ---------- Reveal ---------- */

/* Nur Elemente ausblenden, die das Skript tatsächlich beobachtet –
   ohne JavaScript bleibt alles sichtbar. */
.reveal.will-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.will-reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal.will-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn {
    transition: none;
  }
}

/* ---------- Responsive ---------- */

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

  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 34px;
  }

  .chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-card {
    order: 2;
    max-width: 540px;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px 22px 18px;
    box-shadow: 0 18px 30px -24px rgba(20, 24, 29, 0.5);
    display: none;
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding-block: 12px;
    border-bottom: 1px solid var(--line);
  }

  .nav a:last-child {
    border-bottom: 0;
  }

  .nav .nav-cta {
    margin-top: 10px;
    text-align: center;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .grid-3,
  .grid-2,
  .roles,
  .chips,
  .steps {
    grid-template-columns: 1fr;
  }

  .steps li {
    padding-top: 38px;
  }

  .eyebrow {
    font-size: 0.66rem;
    letter-spacing: 0.1em;
  }

  .cta-row .btn {
    width: 100%;
  }
}
