/* kpx GmbH — Stylesheet */
:root {
  --anthracite: #3C3C3A;
  --anthracite-deep: #333432;
  --ink: #2E2F2E;
  --paper: #ECEBE8;
  --card: #FFFFFF;
  --orange: #F07F00;        /* exakter Logo-Ton */
  --orange-deep: #9E5300;   /* dunklere Variante desselben Farbtons für Text (AA) */
  --muted: #5E5E59;
  --line: rgba(60, 60, 58, .14);
  --line-light: rgba(236, 235, 232, .18);
  --maxw: 1120px;
  --display: 'Comfortaa', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Comfortaa', 'Helvetica Neue', Arial, sans-serif;

  /* Abstands-Skala */
  --space-section: 96px;
  --space-section-sm: 64px;

  /* Radius & Schatten */
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(46, 47, 46, .04), 0 2px 8px rgba(46, 47, 46, .06);
  --shadow-md: 0 6px 16px rgba(46, 47, 46, .09), 0 12px 32px rgba(46, 47, 46, .10);

  /* Übergänge */
  --ease: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transition: none !important; opacity: 1 !important; transform: none !important; }
}

body {
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

p { text-wrap: pretty; }

a { color: var(--orange-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(60, 60, 58, .92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line-light);
  box-shadow: 0 1px 12px rgba(0, 0, 0, .12);
}
.nav .wrap {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 16px;
}
.nav-logo img { height: 34px; width: auto; display: block; }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a {
  position: relative;
  color: #EDEDEA; font-size: .95rem; font-weight: 500;
  letter-spacing: .02em;
  padding-bottom: 3px;
  transition: color .2s var(--ease);
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--orange);
  transform: scaleX(0); transform-origin: left;
  transition: transform .22s var(--ease);
}
.nav-links a:hover { color: #fff; text-decoration: none; }
.nav-links a:hover::after { transform: scaleX(1); }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(240, 126, 1, .16), rgba(240, 126, 1, 0) 55%),
    linear-gradient(180deg, #42423F 0%, var(--anthracite) 45%, var(--anthracite-deep) 100%);
  color: #F2F1EE;
  padding: 96px 0 104px;
  text-align: center;
}
.hero .logo-row {
  display: flex; justify-content: flex-end;
  margin-bottom: 40px;
}
.hero img.hero-logo {
  width: min(150px, 32vw); height: auto; display: block;
}
.tagline {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.25rem, 3.2vw, 1.9rem);
  letter-spacing: .04em;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: .55em;
}
.tagline a { color: #F2F1EE; }
.tagline a:hover { color: var(--orange); text-decoration: none; }
.tagline .dot { color: var(--orange); }
.hero .claim {
  margin-top: 28px;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(242, 241, 238, .82);
}
.hero .cta {
  display: inline-block; margin-top: 40px;
  padding: 13px 30px;
  border-radius: 6px;
  color: #fff; background: transparent;
  font-family: var(--display); font-weight: 700; font-size: 1rem;
  letter-spacing: .03em;
  position: relative;
  transition: background .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.hero .cta::before {
  content: ''; position: absolute; inset: 0;
  border: 1px solid var(--orange);
  border-radius: 6px;
  -webkit-mask: linear-gradient(to bottom, #000 0 30%, transparent 30% 70%, #000 70% 100%);
          mask: linear-gradient(to bottom, #000 0 30%, transparent 30% 70%, #000 70% 100%);
  pointer-events: none;
}
.hero .cta:hover {
  background: var(--orange); text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(240, 126, 1, .35);
}
.hero .cta:active { transform: translateY(0); }

/* ---------- Abschnitte ---------- */
section { padding: var(--space-section) 0; }
.eyebrow {
  font-family: var(--display);
  font-weight: 700;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--orange-deep);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: '·'; color: var(--orange);
  font-size: 2em; line-height: 0;
  vertical-align: -.12em; margin-right: .28em;
}
h1, h2, h3 { font-family: var(--display); line-height: 1.18; }
h1, h2 { letter-spacing: -.015em; text-wrap: balance; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 700; margin-bottom: 28px; }
h3 { font-size: 1.25rem; font-weight: 700; letter-spacing: -.005em; }

.intro p + p { margin-top: 18px; }
.intro p { max-width: 64ch; color: #383937; }
.intro h2 { max-width: 20ch; }

/* ---------- Leistungsbereiche ---------- */
.services { background: var(--paper); padding-top: 0; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--card);
  border-top: 3px solid var(--orange);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 32px 28px 36px;
  scroll-margin-top: 90px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.card h3 { margin-bottom: 18px; }
.card ul { list-style: none; }
.card li {
  padding-left: 22px; position: relative;
  margin-top: 12px; font-size: 1rem; color: var(--ink);
}
.card li::before {
  content: ''; position: absolute; left: 3px; top: .55em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--orange);
}

/* ---------- Rolle ---------- */
.roles { background: var(--anthracite); color: #F2F1EE; }
.roles .eyebrow { color: var(--orange); }
.roles p.lead { max-width: 62ch; color: rgba(242, 241, 238, .85); margin-bottom: 44px; }
.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.role {
  position: relative;
  border-radius: 6px;
  padding: 28px 26px;
  background: rgba(242, 241, 238, .015);
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.role::before {
  content: ''; position: absolute; inset: 0;
  border: 1px solid var(--line-light);
  border-radius: 6px;
  -webkit-mask: linear-gradient(to bottom, #000 0 30%, transparent 30% 70%, #000 70% 100%);
          mask: linear-gradient(to bottom, #000 0 30%, transparent 30% 70%, #000 70% 100%);
  pointer-events: none;
  transition: border-color .25s var(--ease);
}
.role:hover {
  background: rgba(240, 126, 1, .06);
  transform: translateY(-4px);
}
.role:hover::before { border-color: rgba(240, 126, 1, .55); }
.role h3 { color: #fff; margin-bottom: 10px; }
.role p { color: rgba(242, 241, 238, .78); font-size: .98rem; }

/* ---------- Kontakt ---------- */
.contact .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact address { font-style: normal; line-height: 1.8; }
.contact .mail {
  display: inline-block; margin-top: 12px;
  font-family: var(--display); font-weight: 700; font-size: 1.15rem;
  color: var(--orange-deep);
  transition: color .2s var(--ease);
}
.contact .mail:hover { color: var(--orange); }
.contact .map-link, .contact .social-link {
  display: block; margin-top: 14px;
  font-size: .92rem; font-weight: 600;
  color: var(--ink);
  transition: color .2s var(--ease);
}
.contact .map-link:hover, .contact .social-link:hover { color: var(--orange); }

/* ---------- Footer ---------- */
footer {
  background: var(--anthracite-deep);
  color: rgba(242, 241, 238, .75);
  padding: 36px 0;
  font-size: .92rem;
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; }
footer a { color: #EDEDEA; }
footer a:hover { color: var(--orange); }

/* ---------- Unterseiten (Impressum / Datenschutz) ---------- */
.legal { padding: 72px 0 96px; }
.legal h1 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin-bottom: 32px; }
.legal h2 { font-size: 1.25rem; margin: 36px 0 12px; }
.legal p + p { margin-top: 12px; }
.legal .back { display: inline-block; margin-bottom: 28px; font-weight: 600; }

/* ---------- Einblendung ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsiv ---------- */
@media (max-width: 860px) {
  .cards, .role-grid, .contact .grid { grid-template-columns: 1fr; }
  section { padding: var(--space-section-sm) 0; }
  .hero { padding: 72px 0 80px; }
  .nav-links { gap: 18px; }
  .hero .logo-row { justify-content: center; }
}
@media (max-width: 560px) {
  .nav-links { display: none; }
}

/* ---------- Icons (Original-Icons der bisherigen Seite) ---------- */
.card-icon, .role-icon {
  width: 56px; height: 56px; display: block; margin-bottom: 18px;
  color: var(--orange);
}
.role-icon { color: var(--orange); }
.card-icon svg, .role-icon svg, .card-icon img, .role-icon img { width: 100%; height: 100%; }

/* ---------- Ganzheitliche Projektentwicklung ---------- */
.dimensions { background: var(--paper); }
.dimensions p.lead { max-width: 64ch; color: var(--muted); margin-bottom: 40px; }
.dimensions .legal-note { font-size: .85rem; color: var(--muted); margin-top: 16px; }
.integrate {
  margin-top: 30px;
  background: var(--card);
  border-left: 4px solid var(--orange);
  padding: 30px 32px;
}
.integrate h3 { margin-bottom: 10px; }
.integrate p { max-width: 74ch; color: var(--ink); }

/* ---------- Assetklassen ---------- */
.assetclasses { margin-top: 30px; }
.assetclasses .ac-label {
  font-family: var(--display); font-weight: 700; font-size: .78rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--orange);
  margin-bottom: 10px;
}
.assetclasses .ac-intro { max-width: 74ch; color: var(--muted); margin-bottom: 18px; }
.assetclasses .tags {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.assetclasses .tags li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: .92rem; color: var(--ink);
  background: var(--card);
}

/* ---------- Verweis von Karte in Detailabschnitt ---------- */
.card .card-more {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 18px;
  padding: 7px 16px;
  border-radius: 6px;
  font-size: .9rem;
  font-weight: 700;
  color: var(--orange);
  text-decoration: none;
  position: relative;
}
.card .card-more::before {
  content: ''; position: absolute; inset: 0;
  border: 1px solid var(--orange);
  border-radius: 6px;
  -webkit-mask: linear-gradient(to bottom, #000 0 30%, transparent 30% 70%, #000 70% 100%);
          mask: linear-gradient(to bottom, #000 0 30%, transparent 30% 70%, #000 70% 100%);
  pointer-events: none;
}
.card .card-more:hover { background: var(--orange); color: #fff; }

/* ---------- Kaufmännisch/Technisch/Rechtlich – Detail-Akkordeon ---------- */
.dim-focus {
  font-size: .84rem; font-weight: 700; letter-spacing: .04em;
  color: var(--orange-deep); margin: -8px 0 14px;
}
.dim-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 20px;
  padding: 7px 16px;
  border-radius: 6px;
  font-family: var(--body); font-size: .9rem; font-weight: 700;
  color: var(--orange);
  background: transparent;
  border: none;
  position: relative;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.dim-toggle::before {
  content: ''; position: absolute; inset: 0;
  border: 1px solid var(--orange);
  border-radius: 6px;
  -webkit-mask: linear-gradient(to bottom, #000 0 30%, transparent 30% 70%, #000 70% 100%);
          mask: linear-gradient(to bottom, #000 0 30%, transparent 30% 70%, #000 70% 100%);
  pointer-events: none;
}
.dim-toggle:hover { background: var(--orange); color: #fff; }
.dim-toggle-arrow { display: inline-block; transition: transform .25s var(--ease); }
.dim-toggle[aria-expanded="true"] .dim-toggle-arrow { transform: rotate(90deg); }
.dim-detail {
  margin-top: 22px; padding-top: 22px;
  border-top: 1px solid var(--line);
}
.dim-detail-group { margin-top: 18px; }
.dim-detail-group:first-child { margin-top: 0; }
.dim-detail-group h4 {
  font-size: .92rem; font-weight: 700; margin-bottom: 6px;
}
.dim-detail-sub { font-size: .9rem; color: var(--muted); margin-bottom: 6px; }
.dim-key {
  margin-top: 20px; padding: 16px 18px;
  background: rgba(240, 126, 1, .08);
  border-left: 3px solid var(--orange);
  font-size: .88rem; font-style: italic; color: var(--ink);
}
.dim-note {
  margin-top: 30px; padding: 18px 22px;
  background: var(--card);
  border-left: 4px solid var(--orange);
  font-weight: 600; color: var(--ink);
}

/* ---------- Porträt als Mausover beim Namen ---------- */
.name-hover { position: relative; display: inline-block; }
.name-hover .hover-portrait {
  position: absolute; left: 0; bottom: calc(100% + 10px);
  width: 360px; height: auto;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden;
  transform: translateY(6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  pointer-events: none;
  z-index: 5;
}
.name-hover:hover .hover-portrait,
.name-hover:focus-within .hover-portrait {
  opacity: 1; visibility: visible; transform: translateY(0);
}


/* ---------- Ausgewählte Projekte (bewegte Schau) ---------- */
.projects { background: var(--paper); }
.proj-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; margin-top: 30px;
  border-radius: 14px; overflow: hidden; background: var(--anthracite); }
.proj-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; }
.proj-slide.active { opacity: 1; }
.proj-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.03); transition: transform 6s ease; }
.proj-slide.active img { transform: scale(1.12); }
.proj-scrim { position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(18,18,17,.9), rgba(18,18,17,.15) 42%, transparent 70%); }
.proj-ai-tag { position: absolute; top: 16px; left: 16px; z-index: 2; color: #F2F1EE;
  font-size: .72rem; letter-spacing: .03em; padding: 5px 11px; border-radius: 6px;
  background: rgba(18,18,17,.6); }
.proj-cap { position: absolute; left: 34px; right: 34px; bottom: 30px; color: #F2F1EE; }
.proj-badge { display: inline-block; font-family: var(--display); font-weight: 700; font-size: .82rem;
  letter-spacing: .06em; padding: 6px 15px; border-radius: 999px; background: var(--orange); color: var(--ink); margin-bottom: 14px; }
.proj-cls { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--orange); font-weight: 700; margin: 0 0 6px; }
.proj-ttl { font-family: var(--display); font-weight: 700; font-size: 1.7rem; margin: 0; line-height: 1.15; }
.proj-meta { font-size: 1rem; color: rgba(242,241,238,.85); margin: 6px 0 0; }
.proj-dots { position: absolute; bottom: 18px; right: 22px; display: flex; gap: 8px; z-index: 2; }
.proj-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(242,241,238,.4);
  cursor: pointer; border: none; padding: 0; transition: background .2s ease; }
.proj-dot.on { background: var(--orange); }
@media (max-width: 640px) {
  .proj-stage { aspect-ratio: 4 / 3; }
  .proj-dots { top: 14px; right: 14px; bottom: auto; }
  .proj-ai-tag { top: 12px; left: 12px; font-size: .62rem; padding: 4px 9px; }
  .proj-cap { left: 18px; right: 18px; bottom: 20px; }
  .proj-ttl { font-size: 1.1rem; }
  .proj-meta { font-size: .82rem; }
  .proj-badge { font-size: .72rem; padding: 5px 12px; margin-bottom: 10px; }
  .proj-cls { font-size: .68rem; }
}
@media (prefers-reduced-motion: reduce) {
  .proj-slide, .proj-slide img { transition: none; }
  .proj-slide.active img { transform: none; }
}
