/* Nordpixel – Gestaltung
   Farben stammen aus dem LinkedIn-Banner (Verlauf Tannengrün → Lavendel). */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --tanne: #1C5236;
  --tanne-tief: #133B27;
  --tinte: #0F2219;
  --salbei: #78A19D;
  --lavendel: #C2CEF6;
  --nebel: #F1F4FC;
  --grau: #56655E;
  --grau-leise: #7C8983;
  --linie: #D9DFEA;
  --weiss: #FFFFFF;

  --radius-flaeche: 20px;
  --radius-karte: 16px;
  --radius-klein: 10px;
  --rand: clamp(16px, 2.4vw, 32px);
}

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

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

body {
  margin: 0;
  background: var(--weiss);
  color: var(--tinte);
  font-family: "Schibsted Grotesk", "Segoe UI", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

h1, h2, h3 { font-weight: 500; text-wrap: balance; }

h1 {
  font-size: clamp(2.35rem, 4.6vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.028em;
}

h2 {
  font-size: clamp(1.75rem, 2.8vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.3rem;
  line-height: 1.2;
  letter-spacing: -0.012em;
}

a { color: inherit; }

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

[id] { scroll-margin-top: 96px; }

.rahmen {
  width: 100%;
  max-width: 1376px;
  margin-inline: auto;
  padding-inline: var(--rand);
}

.abschnitt { padding-block: clamp(72px, 9vw, 136px); }
.abschnitt--eng { padding-block: 0; }

.sprunglink {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 20;
  padding: 10px 16px;
  background: var(--tinte);
  color: var(--weiss);
  border-radius: 8px;
}
.sprunglink:focus { top: 12px; }

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

.kopf {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.kopf__zeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 80px;
}

.marke {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.marke__zeichen { width: 22px; height: 22px; flex: none; }

.navigation {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.4vw, 36px);
}
.navigation a:not(.knopf) {
  color: var(--grau);
  text-decoration: none;
  padding-block: 8px;
}
.navigation a:not(.knopf):hover { color: var(--tinte); }

.menue-knopf {
  display: none;
  font: inherit;
  color: var(--tinte);
  background: none;
  border: 1px solid var(--linie);
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
}

/* ---------- Knöpfe ---------- */

.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.knopf--tanne { background: var(--tanne); color: var(--weiss); }
.knopf--tanne:hover { background: var(--tanne-tief); }
.knopf--hell { background: var(--weiss); color: var(--tanne-tief); }
.knopf--hell:hover { background: var(--nebel); }
.knopf--umriss { border-color: rgba(255, 255, 255, 0.6); color: var(--weiss); }
.knopf--umriss:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--weiss); }
.knopf--gross { min-height: 56px; padding-inline: 30px; }

/* ---------- Auftakt ---------- */

.auftakt {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 72px);
  min-height: min(620px, 78vh);
  padding: clamp(40px, 6vw, 88px) clamp(24px, 4.5vw, 72px);
  border-radius: var(--radius-flaeche);
  color: var(--weiss);
  background-color: var(--tanne);
  /* Bannerverlauf: Lavendel leuchtet unten rechts, Tannengrün trägt den Text */
  background-image: radial-gradient(
    125% 150% at 100% 100%,
    #C2CEF6 0%,
    #A9BEDB 17%,
    #78A19D 34%,
    #3F6E58 52%,
    #1C5236 70%
  );
  overflow: hidden;
}

.auftakt__text p {
  max-width: 34em;
  margin-top: 24px;
  font-size: clamp(1.05rem, 1.35vw, 1.25rem);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
}

.auftakt__knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.auftakt :focus-visible { outline-color: var(--weiss); }

/* Pixelfeld. Die Pixel setzt site.js. Jedes Pixel kennt seinen Platz im Raster (--x, --y)
   und eine Startlage im Haufen (--dx, --dy, --rot, --ds). Beim Laden schießen die Pixel
   einmal aus dem Haufen an ihren Platz und bleiben dort. Ohne Animation steht das fertige
   Raster sofort da. */

.pixelfeld {
  position: relative;
  width: 100%;
  aspect-ratio: 15 / 10;
}

.pixelfeld i {
  position: absolute;
  left: calc(var(--x) * 100% / 15);
  top: calc(var(--y) * 100% / 10);
  width: calc(100% / 15);
  height: calc(100% / 10);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.5);
  opacity: var(--o);
  transform: scale(0.84);
}
.pixelfeld i.fest { background: rgba(255, 255, 255, 0.92); border-color: transparent; }
.pixelfeld i.tanne { background: var(--tanne); border-color: transparent; }

/* Startlage: sichtbarer, unordentlicher Haufen links im Feld */
.pixelfeld.am-start i {
  transform:
    translate(calc(var(--dx) * 100%), calc(var(--dy) * 100%))
    rotate(var(--rot))
    scale(calc((1 - var(--ds)) * 0.84));
}
/* Ruhige Variante bei „Bewegung reduzieren": Pixel erscheinen nacheinander an Ort und
   Stelle, rechte Spalten zuerst, nichts bewegt sich. */
.pixelfeld.leise-start i { opacity: 0; }
.pixelfeld.leise-ein i {
  transition: opacity 0.6s ease-out;
  transition-delay: var(--d);
}

/* Der Schwung: rechte Spalten zuerst (--d) */
.pixelfeld.im-flug i {
  animation: schwung 0.95s both;
  animation-delay: var(--d);
}

/* Ausholen gegen die Flugrichtung, beschleunigen und dabei in die Länge ziehen,
   über das Ziel hinausschießen, zurückfedern. */
@keyframes schwung {
  0% {
    transform:
      translate(calc(var(--dx) * 100%), calc(var(--dy) * 100%))
      rotate(var(--rot))
      scale(calc((1 - var(--ds)) * 0.84));
    animation-timing-function: ease-out;
  }
  12% {
    transform:
      translate(calc((var(--dx) + var(--vor)) * 100%), calc(var(--dy) * 100%))
      rotate(var(--rot))
      scale(calc((1 - var(--ds)) * 0.84));
    animation-timing-function: cubic-bezier(0.6, 0, 0.9, 0.55);
  }
  55% {
    transform:
      translate(calc(var(--dx) * 0.3 * 100%), calc(var(--dy) * 0.3 * 100%))
      rotate(calc(var(--rot) * 0.12))
      scale(1.25, 0.58);
    animation-timing-function: cubic-bezier(0.1, 0.6, 0.3, 1);
  }
  78% {
    transform: translate(calc(var(--ueber) * 100%), 0%) rotate(0deg) scale(0.78, 0.88);
    animation-timing-function: ease-in-out;
  }
  100% {
    transform: translate(0%, 0%) rotate(0deg) scale(0.84);
  }
}

/* ---------- Einleitung ---------- */

.einleitung {
  max-width: 27em;
  font-size: clamp(1.55rem, 2.7vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -0.018em;
  text-wrap: pretty;
}
.leise { color: var(--grau-leise); }

/* ---------- Projekte ---------- */

.projekte {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
  margin-top: clamp(28px, 3.5vw, 48px);
}

.karte {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3vw, 44px);
  background: var(--nebel);
  border-radius: var(--radius-karte);
}

.karte__kopf {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.karte__kopf h3 {
  font-size: clamp(1.7rem, 2.4vw, 2.2rem);
  letter-spacing: -0.022em;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.95rem;
  color: var(--grau);
}
.status::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 2px;
}
.status--live::before { background: var(--tanne); }
.status--aufbau::before { background: var(--weiss); box-shadow: inset 0 0 0 2px var(--salbei); }

.pixelbild {
  display: grid;
  place-items: center;
  flex: none;
  width: 84px;
  height: 84px;
  background: var(--weiss);
  border-radius: var(--radius-klein);
  color: var(--tanne);
}
.pixelbild svg { width: 46px; height: 46px; }

.karte__text {
  max-width: 36em;
  margin-top: clamp(24px, 3vw, 40px);
  color: var(--grau);
}

.fakten {
  margin-top: 28px;
  border-top: 1px solid var(--linie);
}
.fakten div {
  display: grid;
  grid-template-columns: 8em minmax(0, 1fr);
  gap: 16px;
  padding-block: 13px;
  border-bottom: 1px solid var(--linie);
}
.fakten dt { color: var(--grau); }
.fakten small { font-size: 0.85em; color: var(--grau); white-space: nowrap; }

.textlink {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 28px;
  font-weight: 500;
  color: var(--tanne);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 5px;
}
.textlink:hover { color: var(--tinte); }

/* ---------- Zweispalter (Überschrift links, Inhalt rechts) ---------- */

.zweispalter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(24px, 5vw, 96px);
  align-items: end;
}
.zweispalter--oben { align-items: start; }

.vorspann {
  max-width: 34em;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--grau);
}
.zweispalter > div > .vorspann { margin-top: 24px; }

/* ---------- Arbeitsweise ---------- */

.schritte {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 2.5vw, 40px);
  margin-top: clamp(40px, 5vw, 72px);
}
.schritte li {
  padding-top: 22px;
  border-top: 2px solid var(--tanne);
}
.schritte__nr {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 28px;
  border-radius: 6px;
  background: var(--tanne);
  color: var(--weiss);
  font-weight: 600;
  font-size: 0.95rem;
}
.schritte p { margin-top: 10px; color: var(--grau); }

/* ---------- Über uns ---------- */

.team li {
  padding-block: 26px;
  border-top: 1px solid var(--linie);
}
.team li:last-child { border-bottom: 1px solid var(--linie); }
.team__rolle { margin-top: 2px; color: var(--grau); }
.team__rolle + p { max-width: 36em; margin-top: 12px; }

/* Sichtbarer Platzhalter: muss vor dem Veröffentlichen ersetzt werden */
.offen {
  padding: 2px 8px;
  background: #FFF4C7;
  color: #5A4500;
  border-radius: 4px;
  outline: 1px dashed #B58F00;
}

/* ---------- Fragen ---------- */

.fragen details { border-top: 1px solid var(--linie); }
.fragen details:last-child { border-bottom: 1px solid var(--linie); }

.fragen summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 22px;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
}
.fragen summary::-webkit-details-marker { display: none; }
.fragen summary::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--tanne), var(--tanne)) center / 100% 2px no-repeat,
    linear-gradient(var(--tanne), var(--tanne)) center / 2px 100% no-repeat;
  transition: transform 0.2s ease;
}
.fragen details[open] summary::after {
  background: linear-gradient(var(--tanne), var(--tanne)) center / 100% 2px no-repeat;
}
.fragen details p {
  max-width: 38em;
  padding-bottom: 26px;
  color: var(--grau);
}

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

.kontakt {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(24px, 5vw, 80px);
  padding: clamp(40px, 6vw, 88px) clamp(24px, 4.5vw, 72px);
  border-radius: var(--radius-flaeche);
  background: linear-gradient(120deg, #EEF1FC 0%, #D9E0F8 55%, #C2CEF6 100%);
}

/* Gegenstück zum Pixelfeld oben: hier ist alles einsortiert. Die Pixel setzt site.js. */
.pixelraster {
  display: grid;
  grid-template-columns: repeat(7, 34px);
  gap: 6px;
}
.pixelraster i {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--tanne);
  opacity: var(--o);
}
.pixelraster i.hell { background: var(--weiss); opacity: 0.85; }
.kontakt h2 { max-width: 16em; }
.kontakt p {
  max-width: 32em;
  margin-top: 18px;
  font-size: 1.2rem;
  line-height: 1.5;
  color: #33453C;
}
.kontakt .knopf { margin-top: 32px; }

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

.fuss { margin-top: clamp(56px, 7vw, 104px); }

.fuss__raster {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-block: 48px;
  /* Trennlinie nur so breit wie der Inhalt */
  background: linear-gradient(var(--linie), var(--linie)) top center / calc(100% - 2 * var(--rand)) 1px no-repeat;
}
.fuss__zeile { max-width: 20em; margin-top: 14px; color: var(--grau); }

.fuss nav { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.fuss__titel {
  margin-bottom: 6px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--tinte);
}
.fuss nav a { color: var(--grau); text-decoration: none; }
.fuss nav a:hover { color: var(--tinte); text-decoration: underline; text-underline-offset: 4px; }

.fuss__ende { padding-bottom: 32px; font-size: 0.95rem; color: var(--grau); }

/* ---------- Rechtstexte (Impressum, Datenschutz, AGB) ----------
   Diese Seiten entstehen aus Markdown, deshalb werden hier reine Elemente gestaltet. */

.rechtstext { padding-block: clamp(40px, 6vw, 88px) 0; }
.rechtstext > * { max-width: 44rem; }
.rechtstext h1 { font-size: clamp(2.1rem, 3.6vw, 3rem); margin-bottom: clamp(24px, 3vw, 40px); }
.rechtstext h2 { font-size: 1.55rem; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--linie); }
.rechtstext h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: 0; margin-top: 32px; }
.rechtstext h4 { font-size: 1rem; font-weight: 600; margin: 24px 0 0; }
.rechtstext p, .rechtstext li { color: var(--grau); }
.rechtstext p { margin-top: 12px; }
.rechtstext strong { color: var(--tinte); font-weight: 600; }
.rechtstext a { color: var(--tanne); text-underline-offset: 4px; overflow-wrap: anywhere; }
.rechtstext ul, .rechtstext ol { margin-top: 12px; padding-left: 1.3em; }
.rechtstext ul { list-style: disc; }
.rechtstext ol { list-style: decimal; }
.rechtstext li + li { margin-top: 6px; }
.rechtstext blockquote { margin: 16px 0 0; padding: 16px 20px; background: var(--nebel); border-radius: var(--radius-klein); }
.rechtstext blockquote p:first-child { margin-top: 0; }
.rechtstext hr { margin: 40px 0 0; border: 0; border-top: 1px solid var(--linie); }
.rechtstext code { font-size: 0.92em; overflow-wrap: anywhere; }
.rechtstext table { display: block; overflow-x: auto; margin-top: 16px; border-collapse: collapse; font-size: 0.95rem; }
.rechtstext th, .rechtstext td { padding: 9px 14px 9px 0; border-bottom: 1px solid var(--linie); text-align: left; vertical-align: top; color: var(--grau); }
.rechtstext th { color: var(--tinte); font-weight: 600; }
.rechtstext__stand { margin-top: 40px; font-size: 0.95rem; }

/* ---------- Schmalere Bildschirme ---------- */

@media (max-width: 1000px) {
  .schritte { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
}

@media (max-width: 860px) {
  .auftakt { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .pixelfeld { max-width: 520px; margin-left: auto; }
  .projekte { grid-template-columns: minmax(0, 1fr); }
  .zweispalter { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .kontakt { grid-template-columns: minmax(0, 1fr); }
  .pixelraster { display: none; }
  .fuss__raster { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .menue-knopf { display: inline-flex; }
  .navigation {
    display: none;
    position: absolute;
    left: var(--rand);
    right: var(--rand);
    top: 72px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px;
    background: var(--weiss);
    border: 1px solid var(--linie);
    border-radius: var(--radius-karte);
    box-shadow: 0 18px 40px rgba(15, 34, 25, 0.14);
  }
  .navigation.offen-menue { display: flex; }
  .navigation a:not(.knopf) { padding: 12px 8px; color: var(--tinte); }
  .navigation .knopf { margin-top: 8px; }
}

@media (max-width: 560px) {
  .schritte { grid-template-columns: minmax(0, 1fr); }
  .fakten div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .fakten small { white-space: normal; }
  .pixelbild { width: 64px; height: 64px; }
  .pixelbild svg { width: 36px; height: 36px; }
  .auftakt__knoepfe .knopf, .kontakt .knopf { width: 100%; text-align: center; }
  .fuss__raster { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .knopf, .fragen summary::after { transition: none; }
}
