*,*::before,*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--cx-font); color: var(--cx-ink);
  background: var(--cx-surface); line-height: 1.6;
}
h1,h2,h3 { line-height: 1.15; font-weight: 700; letter-spacing: -.01em; }
a { color: var(--cx-accent); text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container { max-width: var(--cx-maxw); margin-inline: auto; padding-inline: 1.25rem; }
.section { padding-block: clamp(3rem, 6vw, 6rem); }
.section--alt { background: var(--cx-surface-2); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.4rem; border-radius: 999px; font-weight: 600;
  border: 2px solid transparent; cursor: pointer; transition: .15s;
}
.btn--primary { background: var(--cx-accent); color: #fff; }
.btn--primary:hover { filter: brightness(.93); }
.btn--ghost { border-color: var(--cx-accent); color: var(--cx-accent); background: transparent; }
.btn--ghost:hover { background: var(--cx-accent-soft); }

/* Hero */
.hero { padding-block: clamp(3rem, 7vw, 7rem); background: var(--cx-accent-soft); }
.hero__eyebrow { color: var(--cx-accent); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; }
.hero__title { font-size: clamp(2rem, 5vw, 3.4rem); margin: .5rem 0 1rem; }
.hero__subtitle { color: var(--cx-ink-muted); font-size: 1.15rem; max-width: 46ch; }

/* Pillar-Kacheln (Startseite) */
.pillars { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); }
.pillar {
  border: 1px solid var(--cx-border); border-radius: var(--cx-radius);
  padding: 2rem; background: #fff; border-top: 5px solid var(--pc, var(--cx-brand));
  transition: transform .15s, box-shadow .15s;
}
.pillar:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(15,23,42,.08); }
.pillar--automation { --pc: var(--cx-automation); }
.pillar--battery    { --pc: var(--cx-battery); }
.pillar--sand       { --pc: var(--cx-sand); }
.pillar h3 { color: var(--pc); }

/* Feature-Grid */
.features { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); }
.feature { padding: 1.5rem; border-radius: var(--cx-radius); background: var(--cx-surface-2); }
.feature__icon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--cx-accent-soft); color: var(--cx-accent); font-size: 1.3rem; margin-bottom: .75rem;
}

/* Spec-/Abgrenzungstabelle */
.spec { width: 100%; border-collapse: collapse; }
.spec th, .spec td { text-align: left; padding: .9rem 1rem; border-bottom: 1px solid var(--cx-border); }
.spec thead th { color: var(--cx-accent); font-size: .95rem; }

/* FAQ */
.faq__item { border-bottom: 1px solid var(--cx-border); }
.faq__q { width: 100%; text-align: left; background: none; border: 0; padding: 1.1rem 0; font: inherit; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; }
.faq__a { padding-bottom: 1.1rem; color: var(--cx-ink-muted); }
.faq__a[hidden] { display: none; }

/* CTA-Band */
.cta-band { background: var(--cx-accent); color: #fff; border-radius: var(--cx-radius); padding: 2.5rem; text-align: center; }
.cta-band h2 { color: #fff; margin: 0 0 .75rem; }
.cta-band p { margin: 0 0 1.5rem; opacity: .9; }
.cta-band .btn--primary { background: #fff; color: var(--cx-accent); }

/* Kontaktformular */
.contact-form { display: grid; gap: 1.25rem; max-width: 680px; }
.contact-form label { display: flex; flex-direction: column; gap: .4rem; font-weight: 600; font-size: .95rem; }
.contact-form input,
.contact-form textarea,
.contact-form select {
  border: 1px solid var(--cx-border); border-radius: 8px; padding: .65rem 1rem;
  font: inherit; color: var(--cx-ink); background: #fff;
  transition: border-color .15s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none; border-color: var(--cx-accent); box-shadow: 0 0 0 3px var(--cx-accent-soft);
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form .consent { flex-direction: row; align-items: flex-start; gap: .6rem; font-weight: 400; }
.contact-form .consent input { width: auto; margin-top: .25rem; }

/* Header / Mega-Menü */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--cx-border); }
.nav { display: flex; align-items: center; gap: 1.5rem; padding-block: .9rem; }
.nav__brand img { height: 34px; }
.nav__list { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; margin-left: auto; align-items: center; }
.nav__item { position: relative; }
.nav__link { padding: .5rem 0; font-weight: 600; color: var(--cx-ink); background: none; border: 0; cursor: pointer; font: inherit; }
.nav__link:hover { color: var(--cx-accent); }
.mega {
  position: absolute; top: calc(100% + .5rem); left: 0; min-width: 220px;
  background: #fff; border: 1px solid var(--cx-border); border-radius: var(--cx-radius);
  padding: 1.25rem; box-shadow: 0 18px 40px rgba(15,23,42,.12);
}
.mega[hidden] { display: none; }
.mega__head { color: var(--mc, var(--cx-brand)); font-weight: 700; margin-bottom: .5rem; font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; }
.mega--automation { --mc: var(--cx-automation); }
.mega--battery    { --mc: var(--cx-battery); }
.mega--sand       { --mc: var(--cx-sand); }
.mega a { display: block; padding: .35rem 0; color: var(--cx-ink); font-size: .95rem; }
.mega a:hover { color: var(--mc); }

/* Burger (Mobile) */
.nav__burger {
  display: none; margin-left: auto; background: none; border: 0;
  cursor: pointer; padding: .5rem; flex-direction: column; gap: 5px;
}
.nav__burger span { display: block; width: 24px; height: 2px; background: var(--cx-ink); border-radius: 2px; transition: .2s; }

/* Mobile Nav Drawer */
.nav__drawer {
  display: none; position: fixed; inset: 0; background: #fff; z-index: 100;
  flex-direction: column; padding: 1.5rem; overflow-y: auto;
}
.nav__drawer.is-open { display: flex; }
.nav__drawer-close { align-self: flex-end; background: none; border: 0; cursor: pointer; font-size: 1.5rem; color: var(--cx-ink); padding: .5rem; }
.nav__drawer-list { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .25rem; }
.nav__drawer-list a,
.nav__drawer-list button { display: block; padding: .75rem 0; color: var(--cx-ink); font: inherit; font-weight: 600; background: none; border: 0; cursor: pointer; text-align: left; width: 100%; border-bottom: 1px solid var(--cx-border); }
.nav__drawer-sub { padding-left: 1rem; display: none; }
.nav__drawer-sub.is-open { display: block; }
.nav__drawer-sub a { font-weight: 400; border-bottom: 0; color: var(--cx-ink-muted); }

/* Footer */
.site-footer { background: var(--cx-surface-2); border-top: 1px solid var(--cx-border); }
.site-footer a { display: block; color: var(--cx-ink-muted); font-size: .9rem; padding: .2rem 0; }
.site-footer a:hover { color: var(--cx-accent); }
.site-footer strong { display: block; margin-bottom: .5rem; }
.site-footer p { color: var(--cx-ink-muted); font-size: .9rem; margin: 0 0 .5rem; }
.footer__bottom { border-top: 1px solid var(--cx-border); padding-block: 1rem; font-size: .85rem; color: var(--cx-ink-muted); }

/* Sub-page hero tweak */
.hero--sm { padding-block: clamp(2rem, 4vw, 4rem); }

/* Breadcrumb */
.breadcrumb { font-size: .85rem; color: var(--cx-ink-muted); margin-bottom: 1rem; }
.breadcrumb a { color: var(--cx-ink-muted); }
.breadcrumb a:hover { color: var(--cx-accent); }
.breadcrumb span { margin-inline: .4rem; }

@media (max-width: 860px) {
  .nav__list { display: none; }
  .nav__burger { display: flex; }
}
