/* ============================================================
   TEKS – Solution · Dunkles Design-System
   Eine zentrale Stylesheet-Datei für alle Seiten.
   Farben, Abstände und Komponenten sind hier einmal definiert –
   die HTML-Seiten benutzen nur noch diese Klassen.
   ============================================================ */

/* ---------- Grundwerte (Design-Tokens) ---------- */
:root {
  color-scheme: dark;                      /* dunkle Scrollbars & Formularelemente */
  --bg:          #030304;                 /* tiefes, neutrales Schwarz */
  --text:        #e9ecee;
  --text-strong: #f6f8f9;
  --muted:       rgba(208, 216, 222, .84);
  --muted-2:     rgba(202, 210, 216, .7);
  --line:        rgba(240, 244, 246, .10);
  --card-bg:     rgba(9, 13, 17, .82);       /* solide Karten: Text bleibt lesbar */
  --card-line:   rgba(255, 255, 255, .13);
  --indigo:      #4f8bff;                 /* Primär-Akzent: Logo-Blau (seit 07.08.2026) */
  --cyan:        #8fb8ff;                 /* heller Blau-Ton (Variablenname historisch) */
  --violet:      #a78bfa;                 /* Logo-Violett */
  --grad:        linear-gradient(100deg, #5bc7ff, #6f9dff 45%, #b18cff);   /* Logo: Blau -> Violett, leuchtend für dunklen Grund */
}

/* ---------- Basis ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
/* Sprungziele nicht unter dem fixierten Header verstecken */
[id] { scroll-margin-top: 90px; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
::selection { background: rgba(79, 139, 255, .3); }
img { max-width: 100%; }
a { color: inherit; }
main a:not(.btn):not(.card) { color: var(--indigo); }

/* Nur für Screenreader sichtbar (z. B. versteckte Formular-Überschriften) */
.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;
}

/* Skip-Link: erscheint nur, wenn er per Tastatur fokussiert wird */
.skip-link {
  position: fixed;
  top: -100px; left: 1rem;
  z-index: 100;
  background: var(--indigo);
  color: #05060a;
  padding: .7rem 1.2rem;
  border-radius: .6rem;
  font-size: .8rem;
  text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 1rem; }

/* Sichtbarer Tastatur-Fokus für Links und Buttons */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
}

/* ---------- WebGL-Hintergrund ---------- */
/* Die Canvas wird von assets/background.js erzeugt und liegt fix hinter allem */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  pointer-events: none;
}
/* Aller Inhalt liegt ÜBER der Canvas */
.site-header, main, footer, #toTop { position: relative; z-index: 10; }

/* ---------- Header & Navigation ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 2rem;
  /* Inhaber 17.08.2026: "guck mal wie viel Platz da ist" - auf breiten
     Bildschirmen Logo und Menue auf Inhaltsbreite (1240px) zusammenruecken,
     statt sie an die Bildschirmkanten zu kleben. Der Balken bleibt vollbreit. */
  padding-inline: max(2rem, calc((100% - 1240px) / 2));
  transition: background .35s, backdrop-filter .35s;
}
.site-header.scrolled {
  background: rgba(5, 6, 10, .72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.logo {
  font-size: .8rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}
.logo img { height: 2.4rem; width: auto; display: block; }
/* Menü als schwebende Glas-Pille (Inhaber-Wunsch 17.08.2026: moderner,
   kompakter, passend zur Glas-Sprache des Konfigurators). HTML bleibt
   zeichengleich — nur der Look ändert sich. */
.main-nav {
  display: flex;
  gap: .2rem;
  align-items: center;
  padding: .3rem .4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 8px 28px rgba(0, 0, 0, .35);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
@supports not (backdrop-filter: blur(1px)) {
  .main-nav { background: rgba(7, 10, 15, .82); }
}
.main-nav a {
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .015em;
  color: rgba(232, 234, 242, .68);
  text-decoration: none;
  padding: .4rem .78rem;
  border-radius: 999px;
  white-space: nowrap;
  transition: color .25s, background .25s;
}
.main-nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.main-nav a[aria-current="page"] {
  color: #fff;
  background: linear-gradient(120deg, rgba(91, 199, 255, .22), rgba(111, 157, 255, .22), rgba(177, 140, 255, .22));
  box-shadow: inset 0 0 0 1px rgba(139, 168, 255, .35);
}
/* Burger-Button, nur mobil sichtbar */
#navToggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  padding: .4rem;
  cursor: pointer;
}
/* Mobiles Menü */
#mnav {
  display: none;
  position: fixed;
  top: 60px; left: 0; right: 0;
  z-index: 39;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.4rem 2rem 1.8rem;
  background: rgba(5, 6, 10, .95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
#mnav.open { display: flex; }
#mnav a {
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(232, 234, 242, .7);
  text-decoration: none;
}
#mnav a[aria-current="page"] { color: #fff; }
@media (max-width: 768px) {
  .main-nav { display: none; }
  #navToggle { display: block; }
}
/* Ohne JavaScript gäbe es mobil sonst gar keine Navigation:
   dann bleibt die normale Link-Leiste sichtbar, der tote Burger verschwindet */
html:not(.js) .main-nav { display: flex; flex-wrap: wrap; }
html:not(.js) #navToggle { display: none; }

/* ---------- Layout ---------- */
.shell { max-width: 1150px; margin: 0 auto; padding: 0 1.5rem; }
@media (min-width: 1024px) { .shell { padding: 0 2.5rem; } }

.section { padding: 3rem 0; border-top: 1px solid var(--line); } /* Inhaber 17.08.2026: Abstände verringert (vorher 4.5rem) */
.section.no-line { border-top: none; }

/* Großer Startseiten-Hero (voller Bildschirm) */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem 1.5rem 5rem;
  position: relative;
}
/* Kopfbereich der Unterseiten */
.page-hero { padding: 6.5rem 0 2.2rem; } /* Inhaber 17.08.2026: Abstände verringert (vorher 9.5rem/3.5rem) */

/* Raster – brechen auf Mobilgeräten automatisch um */
.grid { display: grid; gap: 1.4rem; }
@media (min-width: 768px)  { .cols-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 640px)  { .cols-4 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .cols-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .split  { grid-template-columns: 5fr 7fr; gap: 3.5rem; } }

/* ---------- Typografie ---------- */
.label {
  font-size: .68rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: rgba(165, 178, 188, .78);
  margin: 0 0 1.1rem;
}
.hero-title {
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  line-height: 1.06;
  letter-spacing: -.02em;
  font-weight: 550;
  color: var(--text-strong);
  margin: 0 0 1.4rem;
  max-width: 20ch;
}
.page-title {
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -.02em;
  font-weight: 550;
  color: var(--text-strong);
  margin: 0 0 1.2rem;
  max-width: 26ch;
}
.section-title {
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  line-height: 1.2;
  letter-spacing: -.01em;
  font-weight: 550;
  color: var(--text-strong);
  margin: 0 0 .9rem;
}
.glow {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  font-size: .95rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 40rem;
  margin: 0 0 1.4rem;
}
.small { font-size: .8rem; color: var(--muted-2); line-height: 1.6; }
.muted { color: var(--muted); }

/* ---------- Karten ---------- */
.card {
  border-radius: 1.1rem;
  border: 1px solid var(--card-line);
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  padding: 1.6rem;
}
.card h2, .card h3 {
  font-size: 1rem;
  font-weight: 550;
  color: var(--text-strong);
  margin: 0 0 .6rem;
}
.card p { font-size: .87rem; line-height: 1.65; color: var(--muted); margin: 0 0 .9rem; }
.card .label { margin-bottom: .7rem; }
/* Karten, die klickbar sind oder hervorstechen sollen */
a.card { display: block; text-decoration: none; }
.card-hover { transition: transform .25s, border-color .25s, box-shadow .25s; }
.card-hover:hover {
  transform: translateY(-4px);
  border-color: rgba(79, 139, 255, .35);
  box-shadow: 0 18px 60px rgba(50, 180, 230, .14);
}

/* Aufzählungen mit leuchtendem Punkt */
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li {
  position: relative;
  padding-left: 1.1rem;
  font-size: .84rem;
  line-height: 1.9;
  color: var(--muted);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: .72em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--grad);
}

/* Kleine runde Kennzeichnung (z. B. "Paket · 01") */
.tag {
  display: inline-flex;
  align-items: center;
  padding: .3rem .8rem;
  border-radius: 999px;
  border: 1px solid rgba(232, 234, 242, .18);
  font-size: .65rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, .03);
}

/* Prozess-Schritte */
.step-number {
  width: 30px; height: 30px;
  flex: none;
  border-radius: 999px;
  border: 1px solid rgba(79, 139, 255, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .68rem;
  letter-spacing: .1em;
  color: var(--indigo);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: .85rem 2rem;
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  color: #05060a;
  background: #e8eaf2;
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(79, 139, 255, .3); }
.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(232, 234, 242, .28);
}
.btn.ghost:hover { border-color: rgba(232, 234, 242, .7); box-shadow: 0 0 30px rgba(103, 212, 248, .2); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }

/* ---------- Formulare (Kontaktseite) ---------- */
.input, .textarea, .select {
  width: 100%;
  border-radius: .8rem;
  border: 1px solid rgba(232, 234, 242, .14);
  background: rgba(255, 255, 255, .045);
  color: var(--text);
  padding: .78rem .95rem;
  font-size: .85rem;
  font-family: inherit;
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.textarea { min-height: 120px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: rgba(79, 139, 255, .6);
  box-shadow: 0 0 0 3px rgba(79, 139, 255, .12);
}
.field-label {
  display: block;
  font-size: .66rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: .45rem;
}
.form-row { margin-bottom: 1.1rem; }
.form-grid-2 { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .form-grid-2 { grid-template-columns: 1fr 1fr; } }

/* Umschalter zwischen den Formularen */
.form-tab {
  font-size: .65rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: .55rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid rgba(232, 234, 242, .2);
  background: transparent;
  color: var(--muted);
  transition: all .25s;
}
.form-tab:hover { border-color: rgba(232, 234, 242, .5); color: var(--text); }
.form-tab.active {
  background: #e8eaf2;
  border-color: #e8eaf2;
  color: #05060a;
}
.hidden { display: none; }

/* ---------- Footer ---------- */
footer.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.6rem 0;
  font-size: .7rem;
  color: var(--muted-2);
}
.site-footer .shell {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem 2rem;
  align-items: center;
  justify-content: space-between;
}
.site-footer a { color: var(--muted); }

/* ---------- Animationen ---------- */
/* Beim Laden (Startseiten-Hero): gestaffeltes Aufsteigen */
.rise { opacity: 0; transform: translateY(26px); animation: rise 1.2s cubic-bezier(.16, .8, .24, 1) forwards; }
.rise.d1 { animation-delay: .25s; }
.rise.d2 { animation-delay: .45s; }
.rise.d3 { animation-delay: .7s; }
.rise.d4 { animation-delay: .95s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* Beim Scrollen (per IntersectionObserver in site.js).
   Versteckt wird nur, wenn JS wirklich läuft (html.js) –
   ohne JavaScript bleiben alle Inhalte einfach sichtbar. */
.reveal { transition: opacity .8s cubic-bezier(.16,.8,.24,1), transform .8s cubic-bezier(.16,.8,.24,1); }
.js .reveal { opacity: 0; transform: translateY(20px); }
.js .reveal.show { opacity: 1; transform: none; }

/* Scroll-Hinweis unten im Hero */
.scrollhint {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  font-size: .6rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: rgba(200, 206, 228, .45);
}
.scrollhint::after {
  content: "";
  width: 1px; height: 34px;
  background: linear-gradient(rgba(200, 206, 228, .6), transparent);
  animation: drop 2s ease-in-out infinite;
}
@keyframes drop {
  0%   { transform: scaleY(0); transform-origin: top; }
  45%  { transform: scaleY(1); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Nach-oben-Button */
#toTop {
  position: fixed;
  right: 1.4rem; bottom: 1.6rem;
  width: 42px; height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(232, 234, 242, .25);
  background: rgba(5, 6, 10, .8);
  backdrop-filter: blur(8px);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;               /* auch aus der Tab-Reihenfolge nehmen */
  pointer-events: none;
  transition: opacity .3s, border-color .3s, visibility 0s .3s;
  z-index: 50;
}
#toTop.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .3s, border-color .3s, visibility 0s 0s;
}
#toTop:hover { border-color: rgba(79, 139, 255, .6); }

/* Weniger Bewegung für Nutzer, die das im System eingestellt haben */
@media (prefers-reduced-motion: reduce) {
  .rise, .reveal { animation: none; transition: none; opacity: 1; transform: none; }
  .scrollhint::after { animation: none; }
  html { scroll-behavior: auto; }
}
