/* ============================================================
   Clerc Consulting — Gemeinsames Stylesheet
   Baut auf tokens.css auf. Gilt für alle Seiten.
   ============================================================ */

/* ---------- Reset & Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; background: var(--bg); }
body {
  font-family: var(--font);
  color: var(--ink);
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px var(--page-pad);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 100;
}
.site-logo {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav a {
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  transition: color .15s;
}
.site-nav a:hover,
.site-nav a.active { color: var(--ink); }

/* Mega-Menü */
.site-header { position: relative; }
.nav-trigger {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  transition: color .15s;
}
.nav-trigger:hover,
.nav-trigger.active,
.nav-trigger.is-open { color: var(--ink); }
.nav-trigger .caret {
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  transition: transform .2s;
}
.nav-trigger.is-open .caret { transform: rotate(-135deg) translateY(2px); }
.mega {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 34px 60px rgba(20,24,28,0.12);
  z-index: 200;
}
.mega-inner { padding: 38px var(--page-pad) 30px; }
.mega .cols {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 26px;
  align-items: start;
}
.mega .grp h4 {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}
.mega a.mi {
  display: block;
  text-decoration: none;
  padding: 9px 0;
}
.mega a.mi .t {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
}
.mega a.mi .d {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.4;
}
.mega a.mi:hover .t { color: var(--accent); }
.mega .grp.cross {
  background: var(--accent-soft);
  border-radius: 14px;
  padding: 16px 18px 8px;
  align-self: stretch;
}
.mega .grp.cross h4 {
  color: var(--ink);
  border-bottom-color: rgba(29,95,168,0.22);
}
.mega .note {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  max-width: 80ch;
}
.mega .note b { color: var(--ink); font-weight: 700; }
.mega .note .badge {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 6px 12px;
}

/* Sprachumschalter */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.lang-toggle button {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 7px 13px;
  line-height: 1;
  color: var(--muted);
  font-size: 12px;
  transition: background .15s, color .15s;
}
.lang-toggle button[data-active="true"] {
  background: var(--ink);
  color: var(--paper);
}

/* Hamburger (nur mobil sichtbar) */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin: -10px 0;
  padding: 11px 9px;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.nav-burger span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .2s, opacity .2s;
}
.site-header.menu-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header.menu-open .nav-burger span:nth-child(2) { opacity: 0; }
.site-header.menu-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px var(--page-pad);
  background: var(--paper);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  flex-wrap: wrap;
}
.f-brand {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.f-cols {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}
.f-col {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.f-col b {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 700;
}
.f-col a {
  font-size: 13.5px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  transition: color .15s;
}
.f-col a:hover { color: var(--accent); }
.f-meta {
  font-size: 12.5px;
  color: var(--muted);
  width: 100%;
  margin-top: 10px;
}

/* ---------- Buttons ---------- */
.btn-accent {
  background: var(--accent);
  color: var(--paper);
  border: 0;
  border-radius: 999px;
  padding: 15px 30px;
  font: inherit;
  font-weight: 700;
  font-size: 15.5px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: opacity .15s;
}
.btn-accent:hover { opacity: .88; }

.btn-light {
  background: var(--paper);
  color: var(--ink);
  border: 0;
  border-radius: 999px;
  padding: 16px 32px;
  font: inherit;
  font-weight: 700;
  font-size: 15.5px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  transition: opacity .15s;
}
.btn-light:hover { opacity: .88; }

.btn-outline {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(251,251,249,0.3);
  border-radius: 999px;
  padding: 16px 30px;
  font: inherit;
  font-weight: 600;
  font-size: 15.5px;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .15s;
}
.btn-outline:hover { border-color: rgba(251,251,249,0.6); }

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Abschnittsköpfe ---------- */
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 36px;
}
.sec-head .sh-l { max-width: 30ch; }
.sec-head h2 {
  font-size: 40px;
  line-height: 1.0;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 14px 0 0;
  text-wrap: balance;
}
.sec-head h2 em { font-style: normal; color: var(--accent); }
.sec-head .sh-lead {
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 42ch;
  margin: 0 0 4px;
}

/* ---------- Bild-Slot (Platzhalter) ---------- */
.img-slot {
  background: var(--accent-soft);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}
.img-slot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.img-slot .tag {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 3;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--paper);
  padding: 6px 12px;
  border-radius: 999px;
}

/* ---------- Pfeil-Link ---------- */
.link-more {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.link-more::after { content: "→"; transition: transform .2s; }
.link-more:hover::after { transform: translateX(4px); }

/* ---------- Leistungs-Karten ---------- */
.svc-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.svc-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 30px 30px 28px;
  display: flex;
  flex-direction: column;
  min-height: 200px;
  text-decoration: none;
  color: inherit;
  transition: border-color .2s;
}
.svc-card:hover { border-color: var(--accent); }
.svc-card .num {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.svc-card h3 {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 14px 0 0;
  color: var(--ink);
}
.svc-card p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
  margin: 12px 0 0;
}
.svc-card .more {
  margin-top: auto;
  padding-top: 20px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.svc-card .more::after { content: "→"; }

/* ---------- Referenz-Karten ---------- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.case-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.case-card .img-slot { height: 220px; }
.case-card .meta {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.case-card .meta span {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}
.case-card h3 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 8px 0 0;
  color: var(--ink);
}
.case-card p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin: 7px 0 0;
}

/* ---------- CTA-Band ---------- */
.cta-band {
  background: var(--ink);
  color: var(--paper);
  border-radius: 24px;
  padding: 56px;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 40px;
  align-items: center;
}
.cta-band .eyebrow { color: var(--accent-light); }
.cta-band h2 {
  font-size: 44px;
  line-height: 1.0;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 16px 0 0;
  max-width: 16ch;
  text-wrap: balance;
}
.cta-band h2 em { font-style: normal; color: var(--accent-light); }
.cta-band p {
  font-size: 16.5px;
  line-height: 1.6;
  color: rgba(251,251,249,0.7);
  margin: 18px 0 0;
  max-width: 40ch;
}
.cta-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

/* ---------- Seiten-Wrapper ---------- */
.page-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--paper);
}
.page-main { flex: 1; }

/* ---------- Responsive ---------- */
/* Bilder nie über den Viewport hinaus */
img { max-width: 100%; height: auto; }

@media (max-width: 1024px) {
  .cta-band { grid-template-columns: 1fr; }
  .sec-head { flex-direction: column; align-items: flex-start; }
  .mega .cols { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile Navigation mit Hamburger-Menü */
@media (max-width: 860px) {
  .site-header { flex-wrap: wrap; }
  .nav-burger { display: flex; }
  .site-nav {
    display: none;
    order: 3;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 6px;
  }
  .site-header.menu-open .site-nav { display: flex; }
  .site-nav > a,
  .nav-trigger {
    width: 100%;
    padding: 16px 2px;
    border-top: 1px solid var(--line);
    font-size: 16px;
  }
  .nav-trigger { justify-content: space-between; }
  .lang-toggle { align-self: flex-start; margin: 14px 0 6px; }
  /* Mega-Menü als gestapelte Liste innerhalb des Menüflusses */
  .mega {
    position: static;
    order: 4;
    flex-basis: 100%;
    box-shadow: none;
    border-bottom: 0;
    border-top: 1px solid var(--line);
  }
  .mega-inner { padding: 6px 0 12px; }
  .mega .cols { grid-template-columns: 1fr; gap: 6px; }
  .mega a.mi { padding: 12px 0; }
  .mega .note { display: none; }
}

@media (max-width: 768px) {
  .site-header { padding: 20px var(--page-pad); }
  .site-footer { padding: 32px var(--page-pad); flex-direction: column; align-items: flex-start; }
  .f-cols { gap: 32px; }
  .svc-cards { grid-template-columns: 1fr; }
  .case-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 30px; }
  .cta-band h2 { font-size: 34px; }
  .sec-head h2 { font-size: 32px; }
}
