/* bureaubold — mobile first */

@font-face { font-family: "Geist"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/geist-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/geist-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/geist-latin-600-normal.woff2") format("woff2"); }

:root {
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --ink: #0B1324;
  --text: #2B3445;
  --muted: #566072;
  --line: #E1E5EC;
  --accent: #3D28B8;
  --accent-ink: #FFFFFF;
  --hover: #2E1E8C;
  --comp: #B4470C;
  --ring: rgba(61, 40, 184, 0.45);
  --ring-0: rgba(61, 40, 184, 0);
  --glow-a: rgba(61, 40, 184, 0.10);
  --glow-b: rgba(64, 150, 220, 0.10);
  --grain-opacity: 0.8;
  --shadow: 0 1px 2px rgba(11, 19, 36, 0.04), 0 8px 24px rgba(11, 19, 36, 0.05);
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad-y: 20px;
  --pad-x: 20px;
  --radius: 12px;
  color-scheme: light dark;
}

/* Dark Mode – folgt der Systemeinstellung */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A0F1A;
    --surface: #111827;
    --ink: #EEF2F8;
    --text: #C9D1DE;
    --muted: #94A0B4;
    --line: #1F2938;
    --accent: #A99BFF;
    --accent-ink: #0A0F1A;
    --hover: #C6BDFF;
    --comp: #FFA45E;
    --ring: rgba(169, 155, 255, 0.5);
    --ring-0: rgba(169, 155, 255, 0);
    --glow-a: rgba(120, 90, 255, 0.16);
    --glow-b: rgba(56, 160, 220, 0.10);
    --grain-opacity: 0.5;
    --shadow: none;
  }
  .bg::after { filter: invert(1); }
}

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

html { -webkit-text-size-adjust: 100%; background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--ink); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* nur für Screenreader sichtbar */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Sprachumschaltung */
html[data-lang="de"] .en, html[data-lang="en"] .de { display: none; }

/* Grundgerüst */
.page {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: var(--pad-y) var(--pad-x);
  padding-left: max(var(--pad-x), env(safe-area-inset-left));
  padding-right: max(var(--pad-x), env(safe-area-inset-right));
  isolation: isolate;
}

/* Hintergrund: zwei weiche Farbfelder, die sehr langsam wandern.
   Bewusst ohne position: fixed – sonst färbt iOS Safari seine Leisten ein. */
.bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 45%, transparent 100%);
          mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 45%, transparent 100%);
}
.bg span {
  --s: min(110vmin, 960px);
  position: absolute;
  width: var(--s);
  height: var(--s);
  margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  border-radius: 50%;
  will-change: transform;
}
.bg span:first-child {
  top: 32vh;
  left: 72%;
  background: radial-gradient(closest-side, var(--glow-a), transparent);
  animation: bb-drift-a 28s ease-in-out infinite alternate;
}
.bg span:last-child {
  top: 74vh;
  left: 26%;
  background: radial-gradient(closest-side, var(--glow-b), transparent);
  animation: bb-drift-b 36s ease-in-out infinite alternate;
}
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.05  0 0 0 0 0.08  0 0 0 0 0.14  0 0 0 0.05 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
@keyframes bb-drift-a {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-8vmin, 6vmin, 0) scale(1.08); }
  100% { transform: translate3d(-3vmin, 11vmin, 0) scale(0.96); }
}
@keyframes bb-drift-b {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(9vmin, -5vmin, 0) scale(1.06); }
  100% { transform: translate3d(4vmin, -10vmin, 0) scale(0.95); }
}

/* Kopf */
.header { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 44px; }
.logo { font-size: 19px; letter-spacing: -0.03em; font-weight: 500; text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; min-height: 44px; }
.logo b { font-weight: 600; }
.logo .dot { color: var(--accent); font-weight: 600; transition: color .3s ease; }
.logo:hover .dot { color: var(--comp); }
.logo:hover { color: var(--ink); }
.back { font-size: 14px; color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; }

/* Startseite */
.hero {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  max-width: 1040px;
  padding: 32px 0 28px;
}

.kicker {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding-left: 2px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}
.kicker::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--ring);
  animation: bb-pulse 2s ease-out infinite;
}
@keyframes bb-pulse {
  0%   { box-shadow: 0 0 0 0 var(--ring); }
  70%  { box-shadow: 0 0 0 10px var(--ring-0); }
  100% { box-shadow: 0 0 0 0 var(--ring-0); }
}
.kicker + h1 { margin-top: -10px; }

h1 {
  margin: 0;
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(40px, 12.4vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: var(--ink);
}
h1 em {
  font-style: normal;
  color: var(--accent);
  background-image: linear-gradient(90deg, var(--accent) 0%, var(--accent) 45%, var(--comp) 100%);
  background-image: linear-gradient(in oklch 90deg, var(--accent) 0%, var(--accent) 45%, var(--comp) 100%);
  background-size: 220% 100%;
  background-position: 0% 0;
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: background-position .8s cubic-bezier(.2, .7, .2, 1);
  padding-right: 0.04em;
}

.intro { margin: 0; max-width: 600px; font-size: 18px; line-height: 1.55; color: var(--text); }

/* Kontakt-Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 4px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px;
  border-radius: 999px;
  font-size: 16px; font-weight: 500; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-primary {
  color: var(--accent-ink);
  background-color: var(--accent);
  background-image: linear-gradient(110deg, var(--accent) 0%, var(--accent) 45%, var(--comp) 100%);
  background-image: linear-gradient(in oklch 110deg, var(--accent) 0%, var(--accent) 45%, var(--comp) 100%);
  background-size: 240% 100%;
  background-position: 0% 0;
  transition: background-position .6s cubic-bezier(.2, .7, .2, 1);
}
.btn-primary:hover { color: var(--accent-ink); }

/* Touch-Geräte ohne Maus: derselbe Farbverlauf läuft langsam von selbst */
@keyframes bb-shift {
  0%, 30%  { background-position: 0% 0; }
  50%, 80% { background-position: 100% 0; }
  100%     { background-position: 0% 0; }
}
@media (hover: none) {
  .btn-primary { animation: bb-shift 8s ease-in-out 1.2s infinite; }
  h1 em        { animation: bb-shift 8s ease-in-out 1.6s infinite; }
}

/* Hover: Blau wandert in die Komplementärfarbe – nur auf Geräten mit Maus */
@media (hover: hover) {
  .btn-primary:hover,
  .btn-primary:focus-visible { background-position: 100% 0; }
  h1:hover em { background-position: 100% 0; }
}
.btn-secondary { border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.btn-secondary:hover { border-color: var(--muted); color: var(--ink); }
.btn svg { width: 16px; height: 16px; flex: none; }

/* Leistungen */
.services {
  list-style: none; margin: 16px 0 0; padding: 0;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 0;
  border-top: 1px solid var(--line);
}
.services li {
  display: flex; align-items: baseline; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  font-size: 17px; font-weight: 500; color: var(--ink); letter-spacing: -0.01em;
}
.services li span { font-size: 13px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.services li b { font-weight: 500; }
.scope { margin: 0; font-size: 15px; color: var(--muted); }

/* Fuß */
.footer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; column-gap: 20px; }
.footer nav { display: flex; flex-wrap: wrap; column-gap: 20px; }
.footer a { display: inline-flex; align-items: center; min-height: 44px; }
.copy { margin: 0; font-size: 14px; color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; }
.legal a { font-size: 14px; color: var(--muted); text-decoration: none; }
.legal a:hover { color: var(--ink); text-decoration: underline; }

.lang { display: flex; align-items: center; font-size: 13px; color: var(--muted); }
.lang button {
  min-width: 32px; min-height: 44px; padding: 0 6px;
  border: 0; background: transparent; cursor: pointer;
  font: 500 13px/1 var(--sans); letter-spacing: 0.04em; color: var(--muted);
}
.lang button[aria-pressed="true"] { font-weight: 600; color: var(--ink); }
.lang button:hover { color: var(--accent); }

/* Rechtstexte & Profil */
.legal-page main { flex: 1 1 auto; max-width: 720px; padding: 40px 0 56px; display: flex; flex-direction: column; gap: 32px; color: var(--text); }
.legal-page h1 { font-size: 40px; letter-spacing: -0.04em; }
.legal-page section { display: flex; flex-direction: column; gap: 8px; }
.legal-page h2,
.legal-page h3 { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.legal-page p { margin: 0; }
.legal-page .mail { overflow-wrap: anywhere; }
.legal-page .stand { font-size: 14px; color: var(--muted); }
.legal-page .h1-secondary { margin: 0; font-size: 32px; font-weight: 600; line-height: 1.05; letter-spacing: -0.04em; text-transform: none; color: var(--ink); }
.legal-page .lang-block { display: flex; flex-direction: column; gap: 32px; }
.divider { width: 100%; border: 0; border-top: 1px solid var(--line); margin: 8px 0; }

.facts { margin: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.facts > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 0; }
.facts dt { font-size: 14px; color: var(--muted); }
.facts dd { margin: 0; color: var(--ink); }

/* Referenzen: Liste der Firmennamen */
.ref-page main { flex: 1 1 auto; padding: 40px 0 56px; display: flex; flex-direction: column; gap: 24px; }
.ref-page h1 { font-size: 40px; letter-spacing: -0.04em; }
.ref-page .intro { font-size: 18px; }
.clients {
  list-style: none; margin: 8px 0 0; padding: 0;
  display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 32px;
  border-top: 1px solid var(--line);
}
.clients li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 22px; font-weight: 500; line-height: 1.25; letter-spacing: -0.02em;
}
.clients span {
  color: var(--text);
  background-image: linear-gradient(90deg, var(--ink) 0%, var(--ink) 45%, var(--accent) 75%, var(--comp) 100%);
  background-image: linear-gradient(in oklch 90deg, var(--ink) 0%, var(--ink) 45%, var(--accent) 75%, var(--comp) 100%);
  background-size: 220% 100%;
  background-position: 0% 0;
  -webkit-background-clip: text;
          background-clip: text;
  transition: background-position .7s cubic-bezier(.2, .7, .2, 1), color .3s ease;
}
@media (hover: hover) {
  .clients li:hover span { color: transparent; -webkit-text-fill-color: transparent; background-position: 100% 0; }
}

/* Tablet / iPad */
@media (min-width: 768px) {
  :root { --pad-y: 32px; --pad-x: 56px; }
  .hero { gap: 28px; padding: 64px 0 48px; }
  h1 { font-size: 80px; }
  .intro { font-size: 20px; }
  .services { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; border-top: 0; margin-top: 32px; }
  .services li { flex-direction: column; gap: 6px; padding: 16px 0 0; border-bottom: 0; border-top: 1px solid var(--ink); font-size: 18px; }
  .footer { flex-direction: row; justify-content: space-between; align-items: center; gap: 24px; padding-top: 12px; }
  .footer-row { flex: 1 1 auto; justify-content: flex-end; }
  .legal-page main { padding: 72px 0 96px; }
  .ref-page main { padding: 72px 0 96px; gap: 28px; }
  .ref-page h1 { font-size: 56px; }
  .clients { grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 0; }
  .clients li { font-size: 26px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 0; }
  .legal-page h1 { font-size: 56px; }
  .legal-page .h1-secondary { font-size: 44px; }
  .facts > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; padding: 14px 20px; }
}

/* Desktop */
@media (min-width: 1024px) {
  :root { --pad-y: 40px; --pad-x: 96px; }
  .hero { padding: 48px 0 40px; }
  h1 { font-size: 104px; }
  .legal-page h1 { font-size: 64px; }
  .ref-page h1 { font-size: 64px; }
  .clients { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .clients li { font-size: 30px; }
}

/* Große Bildschirme */
@media (min-width: 1440px) {
  :root { --pad-x: 120px; }
  h1 { font-size: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Ohne Animation: ein ruhender, dezenter Verlauf im Button */
@media (prefers-reduced-motion: reduce) {
  .btn-primary,
  .btn-primary:hover {
    background-image: linear-gradient(110deg, var(--accent) 30%, color-mix(in srgb, var(--accent) 72%, var(--comp)) 100%);
    background-image: linear-gradient(in oklch 110deg, var(--accent) 30%, color-mix(in oklch, var(--accent) 72%, var(--comp)) 100%);
    background-size: 100% 100%;
    background-position: 0 0;
  }
}
