/* werk42.org — Stylesheet
   Keine externen Ressourcen, keine Webfonts, keine Cookies.
   Grundoptik dunkel; unter prefers-color-scheme: light schaltet die Seite
   auf eine helle Variante um. Hero, Kontaktfeld und Fußzeile bleiben
   in beiden Fällen dunkel ("Nachtfeld"), passend zum Hero-Bild. */

:root {
  /* Nachtfeld — themenunabhängig */
  --night:        #070b14;
  --night-2:      #0b1322;
  --night-text:   #e9eff7;
  --night-soft:   #9db0c8;
  --night-line:   rgba(150, 180, 220, 0.18);

  /* Akzente */
  --teal:         #2bd9b4;
  --cyan:         #38bdf8;
  --amber:        #f5b548;
  --on-accent:    #04121a;

  /* Flächen — werden im Light-Mode überschrieben */
  --bg:           #070b14;
  --bg-alt:       #0a1120;
  --surface:      #0e1626;
  --surface-hi:   #142036;
  --text:         #e9eff7;
  --text-soft:    #94a6be;
  --line:         rgba(150, 180, 220, 0.16);
  --line-hi:      rgba(150, 180, 220, 0.34);
  --accent:       #2bd9b4;
  --accent-2:     #38bdf8;
  --accent-3:     #f5b548;

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 72rem;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:         #f6f8fc;
    --bg-alt:     #ffffff;
    --surface:    #ffffff;
    --surface-hi: #f1f5fb;
    --text:       #0a1220;
    --text-soft:  #4c5c72;
    --line:       rgba(13, 30, 55, 0.13);
    --line-hi:    rgba(13, 30, 55, 0.28);
    --accent:     #0a7a63;
    --accent-2:   #0a6ca8;
    --accent-3:   #8a5e0c;
    color-scheme: light;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.08;
}

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; }
img { max-width: 100%; display: block; }

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

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 1rem; top: 1rem; z-index: 20;
  background: var(--surface); color: var(--text);
  padding: 0.6rem 1rem; border: 1px solid var(--line-hi); border-radius: 6px;
}

/* ---------- Kopfzeile ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(7, 11, 20, 0.72);
  color: var(--night-text);
  border-bottom: 1px solid var(--night-line);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
  padding-block: 0.65rem;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
  white-space: nowrap;
}

.mark svg { width: 1.05rem; height: 0.92rem; flex: none; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 3vw, 1.75rem);
  font-size: 0.93rem;
}

.nav a {
  text-decoration: none;
  color: var(--night-soft);
  transition: color 0.18s ease;
}

.nav a:hover, .nav a:focus-visible { color: var(--night-text); }

.nav .nav__cta {
  color: var(--night-text);
  border: 1px solid var(--night-line);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.nav .nav__cta:hover, .nav .nav__cta:focus-visible {
  border-color: var(--teal);
  background: rgba(43, 217, 180, 0.1);
}

@media (max-width: 43.99rem) {
  .nav a:not(.nav__cta) { display: none; }
}

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

.hero {
  position: relative;
  background: var(--night);
  color: var(--night-text);
  overflow: hidden;
  isolation: isolate;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% 50%;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, var(--night) 4%, rgba(7, 11, 20, 0.92) 34%, rgba(7, 11, 20, 0.35) 68%, rgba(7, 11, 20, 0.55) 100%),
    linear-gradient(180deg, rgba(7, 11, 20, 0.6) 0%, rgba(7, 11, 20, 0) 30%, rgba(7, 11, 20, 0.85) 100%);
}

@media (max-width: 55.99rem) {
  .hero::before {
    background: linear-gradient(180deg, rgba(7, 11, 20, 0.82) 0%, rgba(7, 11, 20, 0.7) 45%, rgba(7, 11, 20, 0.95) 100%);
  }
  .hero__media img { object-position: 64% 42%; }
}

.hero__inner {
  position: relative;
  padding-block: clamp(4.5rem, 13vw, 9rem);
  max-width: 44rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  max-width: 16ch;
  margin-bottom: 1.4rem;
}

.lede {
  font-size: clamp(1.05rem, 2.3vw, 1.25rem);
  color: var(--night-soft);
  max-width: 46ch;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2.3rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.78rem 1.5rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn--primary {
  background: linear-gradient(104deg, var(--teal), var(--cyan));
  color: var(--on-accent);
  box-shadow: 0 6px 26px rgba(43, 217, 180, 0.28);
}

.btn--primary:hover, .btn--primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 34px rgba(43, 217, 180, 0.42);
}

.btn--ghost {
  color: var(--night-text);
  border-color: var(--night-line);
}

.btn--ghost:hover, .btn--ghost:focus-visible {
  border-color: rgba(150, 180, 220, 0.5);
  background: rgba(150, 180, 220, 0.08);
}

/* Kennzahlenband unter dem Hero */

.band {
  background: var(--night-2);
  color: var(--night-text);
  border-top: 1px solid var(--night-line);
  border-bottom: 1px solid var(--night-line);
}

.band__inner {
  display: grid;
  gap: 1px;
  padding: 0;
}

@media (min-width: 44rem) {
  .band__inner { grid-template-columns: repeat(3, 1fr); }
}

.band__item {
  padding: 1.3rem clamp(1.25rem, 5vw, 3rem);
  border-top: 1px solid var(--night-line);
}

.band__item:first-child { border-top: 0; }

@media (min-width: 44rem) {
  .band__item { border-top: 0; border-left: 1px solid var(--night-line); }
  .band__item:first-child { border-left: 0; }
}

.band__item strong {
  display: block;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.band__item span {
  color: var(--night-soft);
  font-size: 0.93rem;
}

/* ---------- Abschnitte ---------- */

.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }

.section h2 {
  font-size: clamp(1.75rem, 4vw, 2.6rem);
  max-width: 20ch;
}

.section__intro {
  margin-top: 1.1rem;
  max-width: 56ch;
  color: var(--text-soft);
}

/* Leistungsraster mit Haarlinien */

.bento {
  margin-top: 2.8rem;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

@media (min-width: 40rem) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) {
  .bento { grid-template-columns: repeat(4, 1fr); }
  .bento__item--wide { grid-column: span 2; }
}

.bento__item {
  position: relative;
  background: var(--surface);
  padding: 1.6rem 1.5rem 1.7rem;
  transition: background 0.2s ease;
}

.bento__item::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.bento__item:hover { background: var(--surface-hi); }
.bento__item:hover::after { opacity: 0.75; }

.bento__item h3 {
  font-size: 1.1rem;
  letter-spacing: -0.015em;
  margin-bottom: 0.45rem;
}

.bento__item p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.97rem;
  max-width: 46ch;
}

/* Branchen */

.branches {
  list-style: none;
  margin: 2.2rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.98rem;
}

.branches li {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 1rem;
  color: var(--text-soft);
}

/* Ablauf */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 3rem 0 0;
  padding: 0;
  display: grid;
  gap: 2rem 2.5rem;
}

@media (min-width: 52rem) {
  .steps { grid-template-columns: repeat(4, 1fr); gap: 0 2.5rem; }
}

.steps li {
  counter-increment: step;
  padding-top: 2.4rem;
  position: relative;
}

.steps li::before {
  content: "";
  position: absolute;
  top: 0.55rem;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--line-hi), var(--line));
}

@media (min-width: 52rem) {
  .steps li::before { right: -2.5rem; }
  .steps li:last-child::before { right: 0; }
}

.steps li::after {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  line-height: 1;
}

.section--alt .steps li::after { background: var(--bg-alt); }

.steps h3 {
  font-size: 1.08rem;
  margin-bottom: 0.35rem;
}

.steps p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.96rem;
}

/* Grenzen */

.limits {
  list-style: none;
  margin: 2.4rem 0 0;
  padding: 0;
  max-width: 56ch;
}

.limits li {
  padding: 0.8rem 0 0.8rem 1.8rem;
  border-top: 1px solid var(--line);
  position: relative;
  color: var(--text-soft);
}

.limits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.35rem;
  width: 0.7rem;
  height: 1px;
  background: var(--accent-3);
}

/* ---------- Drei: Dreieck ---------- */

.trio__inner {
  display: grid;
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: center;
}

@media (min-width: 52rem) {
  .trio__inner { grid-template-columns: 1fr 1fr; }
}

.trio__text { max-width: 48ch; }
.trio__text h2 { margin-bottom: 1.1rem; }
.trio__text p { color: var(--text-soft); }

.trio__figure {
  margin: 0;
  display: grid;
  place-items: center;
}

.trio__figure svg { width: min(100%, 24rem); height: auto; }

.node { transform-box: fill-box; transform-origin: center; }
.node--a { animation: pulse 5.5s ease-in-out infinite; }
.node--b { animation: pulse 5.5s ease-in-out 1.8s infinite; }
.node--c { animation: pulse 5.5s ease-in-out 3.6s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}

/* ---------- 42 ---------- */

.why42 {
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}

.why42__inner {
  padding-block: clamp(3rem, 7vw, 5rem);
  display: grid;
  gap: clamp(1rem, 4vw, 3.5rem);
  align-items: center;
}

@media (min-width: 48rem) { .why42__inner { grid-template-columns: auto 1fr; } }

.why42__no {
  font-size: clamp(5.5rem, 16vw, 11rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.78;
  background: linear-gradient(135deg, var(--accent), var(--accent-2) 55%, var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.why42__text { max-width: 54ch; }
.why42__text h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); margin-bottom: 0.8rem; }
.why42__text p { color: var(--text-soft); }

/* ---------- Kontakt ---------- */

.contact {
  position: relative;
  background: var(--night);
  color: var(--night-text);
  overflow: hidden;
}

.contact::before {
  content: "";
  position: absolute;
  top: -40%;
  left: 50%;
  width: min(60rem, 120%);
  aspect-ratio: 1;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(43, 217, 180, 0.17), rgba(56, 189, 248, 0.07) 42%, transparent 68%);
  pointer-events: none;
}

.contact__inner {
  position: relative;
  padding-block: clamp(4rem, 9vw, 6.5rem);
  text-align: center;
}

.contact h2 {
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  max-width: 18ch;
  margin-inline: auto;
}

.contact p {
  color: var(--night-soft);
  max-width: 50ch;
  margin: 1.1rem auto 0;
}

.contact .cta-row { justify-content: center; margin-top: 2.2rem; }

.contact__meta {
  margin-top: 2rem;
  font-size: 0.93rem;
  color: var(--night-soft);
}

.contact__meta a { color: var(--night-text); }

/* ---------- Fußzeile ---------- */

.foot {
  background: var(--night-2);
  color: var(--night-soft);
  font-size: 0.92rem;
  border-top: 1px solid var(--night-line);
}

.foot__inner {
  padding-block: 2.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2.5rem;
  justify-content: space-between;
  align-items: flex-start;
}

.foot p { margin: 0 0 0.25rem; }

.foot nav { display: flex; gap: 1.4rem; }

.foot a {
  color: var(--night-text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.18s ease;
}

.foot a:hover, .foot a:focus-visible { border-bottom-color: var(--teal); }

/* ---------- Rechtstexte ---------- */

.legal {
  padding-block: clamp(2.5rem, 7vw, 4.5rem);
  max-width: 66ch;
}

.legal h1 {
  font-size: clamp(2rem, 5vw, 2.9rem);
  margin-bottom: 1.8rem;
}

.legal h2 {
  font-size: 1.28rem;
  margin: 2.6rem 0 0.7rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.legal h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 1.8rem; }

.legal h3 {
  font-size: 1.04rem;
  font-weight: 600;
  margin: 1.7rem 0 0.4rem;
}

.legal ul { margin: 0 0 1.1em; padding-left: 1.2rem; color: var(--text-soft); }
.legal li { margin-bottom: 0.35rem; }
.legal p { color: var(--text-soft); }
.legal address { font-style: normal; margin-bottom: 1.1em; color: var(--text); }
.legal a { color: var(--text); text-decoration-color: var(--line-hi); }

.legal__back { display: inline-block; margin-top: 2.5rem; }

.legal__date {
  margin-top: 2.5rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

/* ---------- Rücksicht & Druck ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

[id] { scroll-margin-top: 4.5rem; }

@media print {
  .topbar, .hero__media, .contact::before, .cta-row, .trio__figure { display: none; }
  body, .hero, .band, .contact, .foot, .section--alt, .why42 {
    background: #fff !important;
    color: #000 !important;
  }
  .hero::before { display: none; }
  .lede, .section__intro, .foot a, .contact p, .contact__meta,
  .legal p, .legal ul, .bento__item p, .steps p, .limits li, .trio__text p { color: #000 !important; }
  .why42__no { color: #000 !important; -webkit-text-fill-color: #000; }
  body { font-size: 11pt; }
}
