/*
 * bakit.dev — ein Stylesheet für alle Seiten.
 *
 * Die CSP in nginx.conf erlaubt nur diese Datei (style-src 'self'): kein
 * <style>, kein style="…". Schriften liegen unter /schrift/ (font-src 'self').
 * Hell und dunkel folgen der Systemeinstellung; es gibt kein Skript für einen
 * Umschalter.
 */

@font-face {
  font-family: 'Geist';
  src: url('/schrift/geist.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist Mono';
  src: url('/schrift/geist-mono.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------- Farben */

:root {
  color-scheme: light dark;

  --grund: #f6f4ef;
  --flaeche: #ffffff;
  --flaeche-2: #efece5;
  --text: #16181d;
  --text-leise: #5a5f69;
  --linie: rgb(22 24 29 / 0.1);
  --linie-stark: rgb(22 24 29 / 0.18);
  --akzent: #e0520f;
  --akzent-2: #f29a1d;
  --akzent-text: #b8400a;
  --glut: rgb(240 110 30 / 0.16);
  --schatten: 0 1px 2px rgb(22 24 29 / 0.04), 0 12px 32px -12px rgb(22 24 29 / 0.14);

  --schrift: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --schrift-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --breite: 1120px;
  --rand: clamp(16px, 4vw, 32px);
  --radius: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --grund: #0b0c0f;
    --flaeche: #131519;
    --flaeche-2: #1a1d22;
    --text: #eceae5;
    --text-leise: #9b9fa8;
    --linie: rgb(255 255 255 / 0.08);
    --linie-stark: rgb(255 255 255 / 0.16);
    --akzent: #ff7a36;
    --akzent-2: #ffb14a;
    --akzent-text: #ff9a5c;
    --glut: rgb(255 110 40 / 0.14);
    --schatten: 0 1px 2px rgb(0 0 0 / 0.3), 0 16px 40px -16px rgb(0 0 0 / 0.6);
  }
}

/* ---------------------------------------------------------------- Grundlagen */

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

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

body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: var(--schrift);
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: 'ss01', 'cv11';
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

::selection {
  background: var(--akzent);
  color: #fff;
}

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

.huelle {
  width: 100%;
  max-width: var(--breite);
  margin-inline: auto;
  padding-inline: var(--rand);
}

.sprungmarke {
  position: absolute;
  left: var(--rand);
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--text);
  color: var(--grund);
  text-decoration: none;
  font-weight: 600;
}

.sprungmarke:focus {
  top: 12px;
}

/* ---------------------------------------------------------------- Kopf */

.kopf {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--grund) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--linie);
}

.kopf .huelle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.wortmarke {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 650;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.wortmarke svg {
  width: 30px;
  height: 30px;
}

/* bakIT: das „IT" der Marke in der Akzentfarbe. */
.wortmarke .it {
  color: var(--akzent);
  letter-spacing: -0.01em;
}

.navi {
  display: flex;
  gap: 4px;
}

.navi a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text-leise);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.15s, background-color 0.15s;
}

.navi a:hover {
  color: var(--text);
  background: var(--flaeche-2);
}

@media (max-width: 560px) {
  .navi a.nur-breit {
    display: none;
  }
}

/* ---------------------------------------------------------------- Bühne */

.buehne {
  position: relative;
  isolation: isolate;
  padding-block: clamp(72px, 12vw, 148px) clamp(64px, 9vw, 112px);
  overflow: hidden;
}

/* Raster, das zur Mitte hin ausblendet. */
.buehne::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--linie) 1px, transparent 1px),
    linear-gradient(90deg, var(--linie) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 30%, transparent 75%);
}

/* Glut oben rechts. */
.buehne::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: min(900px, 120vw);
  aspect-ratio: 1;
  right: -20%;
  top: -45%;
  background: radial-gradient(circle, var(--glut) 0%, transparent 62%);
  pointer-events: none;
}

.buehne-raster {
  display: grid;
  gap: 56px;
}

@media (min-width: 980px) {
  .buehne-raster {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    align-items: center;
    gap: 64px;
  }
}

/* Das Markendiagramm rechts in der Bühne. */
.baum {
  justify-self: center;
  width: 100%;
  max-width: 440px;
  padding: 24px;
  border: 1px solid var(--linie);
  border-radius: calc(var(--radius) + 6px);
  background: color-mix(in srgb, var(--flaeche) 82%, transparent);
  box-shadow: var(--schatten);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.knoten {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--linie);
  border-radius: 14px;
  background: var(--flaeche);
  min-width: 0;
}

.knoten div {
  display: grid;
  min-width: 0;
}

.knoten strong {
  font-weight: 620;
  letter-spacing: -0.02em;
}

.knoten span {
  overflow: hidden;
  color: var(--text-leise);
  font-family: var(--schrift-mono);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knoten-dach {
  padding: 18px;
  border-color: var(--linie-stark);
}

.knoten-dach strong {
  font-size: 20px;
}

.knoten-bild {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.knoten-bild svg {
  width: 20px;
  height: 20px;
}

.knoten-bau {
  background: var(--glut);
  color: var(--akzent-text);
}

.knoten-asche {
  background: #16131a;
  color: #ffb14a;
}

.aeste {
  width: 100%;
  height: 40px;
}

.aeste path {
  fill: none;
  stroke: var(--linie-stark);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
  vector-effect: non-scaling-stroke;
}

.kinder {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.kinder .knoten {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.baum-fuss {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 12px 14px 0;
  border-top: 1px dashed var(--linie-stark);
  color: var(--text-leise);
  font-family: var(--schrift-mono);
  font-size: 12px;
}

.baum-fuss .lampe {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2fb867;
  box-shadow: 0 0 0 4px rgb(47 184 103 / 0.15);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  padding: 6px 14px 6px 8px;
  border: 1px solid var(--linie-stark);
  border-radius: 999px;
  background: color-mix(in srgb, var(--flaeche) 70%, transparent);
  color: var(--text-leise);
  font-family: var(--schrift-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.kicker .lampe {
  width: 8px;
  height: 8px;
  margin-left: 4px;
  border-radius: 50%;
  background: var(--akzent);
  box-shadow: 0 0 0 4px var(--glut);
}

.buehne h1 {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(44px, 8.2vw, 92px);
  font-weight: 650;
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.leuchtend {
  background: linear-gradient(100deg, var(--akzent) 10%, var(--akzent-2) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.einleitung {
  max-width: 56ch;
  margin: 28px 0 0;
  color: var(--text-leise);
  font-size: clamp(18px, 2.1vw, 21px);
  line-height: 1.55;
  text-wrap: pretty;
}

.knoepfe {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.knopf {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s, background-color 0.15s, border-color 0.15s;
}

.knopf:hover {
  transform: translateY(-1px);
}

.knopf-voll {
  background: var(--text);
  color: var(--grund);
}

.knopf-rand {
  border-color: var(--linie-stark);
  background: color-mix(in srgb, var(--flaeche) 60%, transparent);
}

.knopf-rand:hover {
  border-color: var(--text-leise);
}

.pfeil {
  transition: transform 0.15s;
}

a:hover .pfeil {
  transform: translateX(3px);
}

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

.abschnitt {
  padding-block: clamp(64px, 9vw, 112px);
}

.abschnitt + .abschnitt {
  border-top: 1px solid var(--linie);
}

.ueberschrift {
  display: grid;
  gap: 14px;
  max-width: 640px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.marke-klein {
  margin: 0;
  color: var(--akzent-text);
  font-family: var(--schrift-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ueberschrift h2 {
  margin: 0;
  font-size: clamp(32px, 4.6vw, 48px);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.ueberschrift p {
  margin: 0;
  color: var(--text-leise);
  font-size: 18px;
}

/* ---------------------------------------------------------------- Marken */

.marken {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 20px;
}

.marke {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  background: var(--flaeche);
  box-shadow: var(--schatten);
  transition: transform 0.2s, border-color 0.2s;
}

.marke:hover {
  transform: translateY(-3px);
  border-color: var(--linie-stark);
}

.marke-bild {
  position: relative;
  height: 220px;
  border-bottom: 1px solid var(--linie);
  background: var(--flaeche-2);
  overflow: hidden;
}

.marke-bild svg {
  width: 100%;
  height: 100%;
}

.marke-bild-bau {
  background:
    linear-gradient(var(--linie) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, var(--linie) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--flaeche-2);
}

.marke-bild-asche {
  background: radial-gradient(ellipse 60% 70% at 50% 100%, var(--glut), transparent 70%), #121014;
}

.marke-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
}

.etiketten {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.etiketten li {
  padding: 3px 10px;
  border: 1px solid var(--linie);
  border-radius: 999px;
  color: var(--text-leise);
  font-family: var(--schrift-mono);
  font-size: 12px;
}

.marke h3 {
  margin: 4px 0 0;
  font-size: 28px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.marke p {
  margin: 0;
  color: var(--text-leise);
}

.marke-fuss {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
}

.marke-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  text-decoration: none;
}

.marke-link::after {
  /* Die ganze Karte ist klickbar. */
  content: '';
  position: absolute;
  inset: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-leise);
  font-family: var(--schrift-mono);
  font-size: 13px;
}

.status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--akzent-2);
}

.status-live::before {
  background: #2fb867;
}

/* Zeichnungen in den Markenbildern */

.bau-linie {
  fill: none;
  stroke: var(--text);
  stroke-width: 2;
}

.bau-mass {
  fill: none;
  stroke: var(--akzent);
  stroke-width: 1.5;
}

.bau-raum {
  fill: var(--flaeche);
  stroke: var(--text);
  stroke-width: 2.5;
}

.bau-laser {
  fill: none;
  stroke: var(--akzent);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
}

.bau-punkt {
  fill: var(--akzent);
}

.bau-schrift {
  fill: var(--akzent-text);
  font-family: var(--schrift-mono);
  font-size: 11px;
  font-weight: 500;
}

.glocke {
  fill: none;
  stroke: #f3e9dd;
  stroke-width: 2;
  stroke-linejoin: round;
}

.glocke-kern {
  fill: #ff7a36;
}

.funke {
  fill: #ffb14a;
  animation: steigen 6s ease-in infinite;
  opacity: 0;
}

.funke:nth-of-type(2) { animation-delay: 1.2s; }
.funke:nth-of-type(3) { animation-delay: 2.4s; }
.funke:nth-of-type(4) { animation-delay: 3.6s; }
.funke:nth-of-type(5) { animation-delay: 4.8s; }

@keyframes steigen {
  0% { transform: translateY(0); opacity: 0; }
  15% { opacity: 0.9; }
  100% { transform: translateY(-120px); opacity: 0; }
}

/* ---------------------------------------------------------------- Haltung */

.haltung {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.haltung li {
  padding: 28px;
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  background: var(--flaeche);
}

.haltung svg {
  width: 40px;
  height: 40px;
  margin-bottom: 20px;
  padding: 9px;
  border-radius: 12px;
  background: var(--glut);
  color: var(--akzent-text);
}

.haltung h3 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 620;
  letter-spacing: -0.02em;
}

.haltung p {
  margin: 0;
  color: var(--text-leise);
  font-size: 16px;
}

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

.kontakt {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 24px;
  justify-items: start;
  overflow: hidden;
  padding: clamp(36px, 6vw, 72px);
  border: 1px solid var(--linie);
  border-radius: calc(var(--radius) + 8px);
  background: var(--flaeche);
  box-shadow: var(--schatten);
}

.kontakt::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: 640px;
  aspect-ratio: 1;
  right: -200px;
  bottom: -360px;
  background: radial-gradient(circle, var(--glut), transparent 65%);
}

.kontakt h2 {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.kontakt p {
  max-width: 48ch;
  margin: 0;
  color: var(--text-leise);
  font-size: 18px;
}

.mail {
  font-family: var(--schrift-mono);
  font-weight: 500;
  word-break: break-all;
}

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

.text-seite {
  padding-block: clamp(48px, 8vw, 96px);
}

.text-seite .ueberschrift {
  margin-bottom: 40px;
}

.text-seite h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 60px);
  font-weight: 650;
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.text {
  max-width: 720px;
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  background: var(--flaeche);
}

.text h2 {
  margin: 40px 0 10px;
  font-size: 20px;
  font-weight: 620;
  letter-spacing: -0.02em;
}

.text h2:first-child {
  margin-top: 0;
}

.text p,
.text ul,
.text address {
  margin: 0 0 14px;
  color: var(--text-leise);
  font-style: normal;
}

.text strong {
  color: var(--text);
  font-weight: 600;
}

.text ul {
  padding-left: 20px;
}

.text li + li {
  margin-top: 6px;
}

.text a {
  color: var(--akzent-text);
  text-underline-offset: 3px;
}

.stand {
  margin-top: 32px;
  color: var(--text-leise);
  font-family: var(--schrift-mono);
  font-size: 13px;
}

/* ---------------------------------------------------------------- 404 */

.leer {
  display: grid;
  place-items: center;
  min-height: 62vh;
  padding-block: 64px;
  text-align: center;
}

.leer .code {
  margin: 0;
  font-family: var(--schrift-mono);
  font-size: clamp(88px, 20vw, 180px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.06em;
}

.leer h1 {
  margin: 12px 0 8px;
  font-size: 28px;
  letter-spacing: -0.03em;
}

.leer p:not(.code) {
  margin: 0 0 28px;
  color: var(--text-leise);
}

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

.fuss {
  padding-block: 40px;
  border-top: 1px solid var(--linie);
  color: var(--text-leise);
  font-size: 15px;
}

.fuss .huelle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}

.fuss .wortmarke {
  color: var(--text);
  font-size: 17px;
}

.fuss .wortmarke svg {
  width: 24px;
  height: 24px;
}

.fuss nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.fuss a {
  text-decoration: none;
}

.fuss a:hover {
  color: var(--text);
}

/* ---------------------------------------------------------------- Bewegung */

@media (prefers-reduced-motion: no-preference) {
  .auftritt {
    animation: auftauchen 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .auftritt-2 { animation-delay: 0.08s; }
  .auftritt-3 { animation-delay: 0.16s; }
  .auftritt-4 { animation-delay: 0.24s; }

  @keyframes auftauchen {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .funke {
    opacity: 0.6;
  }
}
