/* ITkub — itkub.de
   Aufbau und Struktur nach co-37.com, Farbwelt ITkub.
   Variante B: Grund #242424, Anthrazit #3A3A3A als Kachelfläche.
   Akzent #5C99D0 — der Blauton des ITkub-Logos (#448AC9), aufgehellt,
   damit er auf dem Anthrazit die WCAG-Schwelle von 4.5 überschreitet. */

/* Schriften lokal — keine Einbindung von Google Fonts, damit beim
   Seitenaufruf keine IP-Adresse an Dritte übertragen wird und die
   Seite ohne Einwilligungsbanner auskommt. */
@font-face { font-family:'Archivo'; font-style:normal; font-weight:500; font-display:swap; src:url('../fonts/archivo-500.woff2') format('woff2'); }
@font-face { font-family:'Archivo'; font-style:normal; font-weight:600; font-display:swap; src:url('../fonts/archivo-600.woff2') format('woff2'); }
@font-face { font-family:'Archivo'; font-style:normal; font-weight:700; font-display:swap; src:url('../fonts/archivo-700.woff2') format('woff2'); }
@font-face { font-family:'JetBrains Mono'; font-style:normal; font-weight:400; font-display:swap; src:url('../fonts/jetbrainsmono-400.woff2') format('woff2'); }
@font-face { font-family:'JetBrains Mono'; font-style:normal; font-weight:500; font-display:swap; src:url('../fonts/jetbrainsmono-500.woff2') format('woff2'); }
@font-face { font-family:'JetBrains Mono'; font-style:normal; font-weight:700; font-display:swap; src:url('../fonts/jetbrainsmono-700.woff2') format('woff2'); }

:root {
  --bg: #242424;
  --surface: #3a3a3a;
  --surface-2: #454545;
  --header: #2e2e2e;
  --border: #4a4a4a;
  --border-soft: #333333;

  --text: #f2f4f6;
  --text-muted: #aeb4b9;
  --text-dim: #888e93;

  --accent: #5c99d0;
  --accent-hover: #73a8d7;
  --accent-bg: rgba(92, 153, 208, .12);
  --on-accent: #111111;

  --ok: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;
  --whatsapp: #25d366;

  --radius: 8px;
  --font-ui: 'Archivo', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Scanlines: 1px-Linie alle 4px, wie auf itkub.de — hier als CSS statt Canvas. */
body {
  background-color: var(--bg);
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(92, 153, 208, .06) 0px,
    rgba(92, 153, 208, .06) 1px,
    transparent 1px,
    transparent 4px
  );
  background-attachment: fixed;
}

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

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

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute; left: -9999px;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 16px; border-radius: 6px; z-index: 100;
}
.skip:focus { left: 16px; top: 16px; }

/* Inhalt über dem Partikel-Canvas (z-index 0) halten */
header.site, section, footer.site, .cookie-banner, .wa-float { position: relative; z-index: 1; }

/* ---------- Header ---------- */
header.site {
  background: var(--header);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 80px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  min-width: 0;
}
.brand:hover { text-decoration: none; }
.brand img { height: 34px; width: auto; flex-shrink: 0; }
.brand .tagline {
  font-family: var(--font-mono);
  font-size: .62rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
  line-height: 1.35;
}

nav.main { display: flex; gap: 4px; align-items: center; }
nav.main a {
  color: var(--text-muted);
  font-size: .94rem;
  padding: 8px 12px;
  border-radius: 6px;
}
nav.main a:hover { color: var(--text); background: var(--surface-2); text-decoration: none; }
nav.main a.active { color: var(--text); background: var(--surface-2); }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 56px; text-align: center; }
.hero-logo {
  margin: 0 auto 20px;
  height: clamp(130px, 17vw, 225px);
  width: auto;
}
.hero-kicker {
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 16px;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  margin: 0 0 18px;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.hero .lead {
  color: var(--text-muted);
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 auto 32px;
}
.hero .lead strong { color: var(--text); font-weight: 600; }

.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 6px;
  font-weight: 600;
  font-size: .96rem;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-ui);
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: #505050; }
.btn-sm { padding: 9px 18px; font-size: .86rem; flex-shrink: 0; }

/* ---------- Leistungs-Icons ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 8px 0 8px;
}
.svc {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  text-align: center;
}
.svc svg { width: 30px; height: 30px; color: var(--accent); display: block; }
.svc span {
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- Sections ---------- */
section { padding: 56px 0; }
section h2 { font-size: 1.6rem; margin: 0 0 8px; letter-spacing: -.01em; }
section .section-lead {
  color: var(--text-muted);
  margin: 0 0 32px;
  max-width: 680px;
}

/* ---------- Karten ---------- */
/* Zwei Spalten, damit die vier Karten ein sauberes 2×2 ergeben und keine
   allein in einer dritten Reihe steht. */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
@media (max-width: 760px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.card h3 { margin: 0 0 8px; font-size: 1.02rem; letter-spacing: .01em; }
.card p { margin: 0; color: var(--text-muted); font-size: .95rem; }

/* ---------- Kontaktformular ---------- */
.form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form label {
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 14px;
}
.form label:first-of-type { margin-top: 0; }
.form input, .form textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: .95rem;
  color: var(--text);
  font-family: var(--font-ui);
  width: 100%;
}
.form input:focus, .form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}
.form textarea { min-height: 130px; resize: vertical; }
.form button { align-self: flex-start; margin-top: 20px; }
.form .hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}
.form .consent {
  font-size: .82rem;
  color: var(--text-dim);
  margin: 16px 0 0;
}

.msg {
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 0 0 24px;
  max-width: 520px;
  font-size: .92rem;
  border: 1px solid currentColor;
}
.msg.ok { color: var(--ok); }
.msg.err { color: var(--bad); }
.msg strong { color: var(--text); }

/* ---------- Fließtext (Rechtstexte) ---------- */
/* Spalte mittig auf der Seite, Text darin linksbündig — wie auf co-37.com. */
.prose { max-width: 720px; margin-inline: auto; }
/* Seitenkopf der Rechtsseiten: Überschrift und Unterzeile zentriert. */
.page-head { padding: 72px 0 24px; text-align: center; }
.page-head h1 {
  font-size: clamp(2rem, 4vw, 2.9rem);
  margin: 0 0 18px;
  letter-spacing: -.01em;
  text-wrap: balance;
}
.page-head .lead { color: var(--text-muted); font-size: 1.15rem; margin: 0; }
.prose h2 { font-size: 1.15rem; margin: 40px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1rem; margin: 26px 0 8px; }
.prose p, .prose li {
  color: var(--text-muted);
  margin: 0 0 12px;
  font-size: .96rem;
}
.prose ul { margin: 0 0 12px; padding-left: 20px; }
.prose strong { color: var(--text); }
.prose address { font-style: normal; color: var(--text-muted); margin: 0 0 12px; }
.prose .stand {
  color: var(--text-dim);
  font-size: .85rem;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* Hinweisblock, Maße 1:1 von co-37.com */
.note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  color: var(--text-muted);
  font-size: .92rem;
  margin: 20px auto;
  max-width: 640px;
}
.note strong { color: var(--text); }

/* ---------- Footer ---------- */
footer.site {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 28px 0;
}
footer.site .footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
/* Herkunftszeile mit CO-37-Logo, verlinkt auf co-37.com */
.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-muted);
  font-size: .9rem;
}
.footer-brand:hover { text-decoration: none; color: var(--text); }
.footer-brand svg { width: 34px; height: 34px; flex-shrink: 0; color: var(--text); }
.footer-brand strong { color: var(--text); font-weight: 700; }
.footer-brand .by { color: var(--text-dim); }

footer.site nav a { color: var(--text-muted); font-size: .88rem; margin-left: 18px; }
footer.site nav a:first-child { margin-left: 0; }
/* 0.8rem wie die sichtbare Copyright-Zeile auf co-37.com — dort steht sie
   im Marken-Block, der sie auf 0.8rem herunterzieht. */
footer.site .copyright { color: var(--text-dim); font-size: .8rem; margin: 16px 0 0; }

/* ---------- Cookie-Hinweis ---------- */
.cookie-banner {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  z-index: 50;
  background: var(--header);
  border-top: 1px solid var(--border);
  padding: 16px 0 calc(16px + env(safe-area-inset-bottom, 0px));
}
.cookie-banner[hidden] { display: none !important; }
.cookie-banner .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.cookie-banner p { margin: 0; color: var(--text-muted); font-size: .9rem; max-width: 640px; }

/* ---------- WhatsApp-Button ---------- */
.wa-float {
  position: fixed;
  left: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--whatsapp);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .45);
  transition: transform .15s ease;
}
.wa-float:hover { transform: scale(1.06); text-decoration: none; }
.wa-float svg { width: 30px; height: 30px; color: #fff; }
/* Solange der Cookie-Hinweis steht, den Button darüber schieben */
body.cookie-open .wa-float { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }

/* ---------- Partikel-Canvas ---------- */
#itkub-particles {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  pointer-events: none;
  background: transparent;
}

/* ---------- Schmale Viewports ---------- */
@media (max-width: 680px) {
  nav.main { display: none; }
  .services { grid-template-columns: repeat(2, 1fr); gap: 26px; }
  footer.site .footer-row { flex-direction: column; align-items: flex-start; }
  footer.site nav a { margin-left: 0; margin-right: 16px; }
  .wa-float { width: 50px; height: 50px; left: 16px; }
  .wa-float svg { width: 26px; height: 26px; }
}

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