/* ==========================================================================
   idea-sketch – design the modern web
   Statisches Stylesheet (Light/Dark), keine externen Ressourcen.
   Bewusst schlicht: keine Schatten, keine Farbverläufe.
   ========================================================================== */

/* ---------- Fonts (lokal) ---------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/inter-normal-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/inter-italic-latin.woff2') format('woff2');
}

/* ---------- Design-Tokens ---------- */
:root {
  --bg: #f4f3ef;
  /* --bg: #d7f777; */
  --surface: #ffffff;
  --text: #111111;
  --text-muted: #5c5c5c;
  --accent: #1102b5;          /* Markenblau: nur Links & Lineal-Markierung */
  --line: rgba(17, 17, 17, 0.14);

  --radius: 14px;
  --radius-sm: 8px;
  --content-width: 1400px;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --font: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light;
}
[data-theme='dark'] {
  --bg: #111111;
  --surface: #1a1a1a;
  --text: #f4f3ef;
  --text-muted: #a3a3a3;
  --accent: #a9adff;
  --line: rgba(244, 243, 239, 0.14);
  color-scheme: dark;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 11rem;   /* Kopfzeile + Abschnittsüberschrift */
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s, color 0.3s;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.2em; }
h1, h2, h3 { color: var(--text); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 1.6em; }
p { margin: 0 0 1em; }

.content { width: 100%; max-width: var(--content-width); margin: 0 auto; padding: 0 var(--pad); }
.section { padding: clamp(4rem, 9vw, 7rem) 0; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}
.section-title { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 800; }
.section-lead { font-size: 1.15rem; color: var(--text-muted); }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  padding: 0.6rem 1rem; border-radius: 999px;
  background: var(--text); color: var(--bg);
}
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--text); outline-offset: 0; border-radius: 0; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 3px solid var(--text); 
  border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 1.25rem;
  background: #dcdbd7; color: var(--text);   /* = rgba(0,0,0,.1) auf --bg, aber deckend (Hintergrundgrafik scheint nicht durch) */
  text-decoration: none; cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
[data-theme='dark'] .button { background: #292929; }   /* = rgba(255,255,255,.1) auf --bg, deckend */
/* Alle Buttons gleich: normal leicht hinterlegt, beim Hover/Fokus schwarz gefüllt */
.button:hover, .button:focus-visible { background: var(--text); color: var(--bg); }

/* ==========================================================================
   Navigation – Leiste rechts mit wandernden Abschnitts-Labels
   (Kommende Punkte stehen unten rechts, der aktive Abschnitt
   wandert hochkant an der Leiste nach oben und wird oben zur Überschrift.)
   ========================================================================== */
:root {
  --rail-w: 56px;
  --gutter: 1.5rem;       /* Abstand zwischen Leiste und Menü */
  --edge: calc(var(--rail-w) + var(--gutter));   /* Abstand Bildschirmrand <-> Menü (rechts) bzw. Logo/Inhalt/Footer (links) */
  --title-size: 1.9rem;   /* große Abschnittsüberschrift in der Menü-Spalte */
  --menu-size: 1.4rem;    /* Schriftgröße der inaktiven Menüpunkte (Stapel unten, Liste oben) */
  --menu-w: 13rem;   /* reservierte Spalte für den Menü-Stapel, per JS exakt gemessen */
  --rule: var(--line);
}
[data-theme='dark'] {
  --rule: var(--line);
}
/* Kleinere Desktops: schmalere Ränder und kleinere Menüschrift, damit mehr Platz für den Inhalt bleibt */
@media (max-width: 1200px) {
  :root { --rail-w: 44px; --gutter: 1rem; --menu-size: 1.15rem; --title-size: 1.6rem; }
}
/* Desktop: Inhalt links bündig mit dem Logo */
@media (min-width: 901px) {
  main .content { padding-left: var(--edge); }
}

body { position: relative; padding-right: calc(var(--rail-w) + var(--menu-w)); }
/* Desktop: senkrechte Linie trennt Inhaltsbereich und Menü-Spalte (bleibt beim Scrollen stehen) */
:root { --menu-idle-opacity: 0.55; }   /* Deckkraft der inaktiven Menüpunkte – gilt auch für die Trennlinie */
@media (min-width: 901px) {
  body::after {
    content: '';
    position: fixed;
    top: 92px; bottom: 0;                               /* unter der Logo-Zeile bis zum unteren Rand */
    right: calc(var(--rail-w) + var(--menu-w));
    width: 3px;
    background: linear-gradient(to bottom, var(--accent), #dd00dd, var(--accent));  /* Logo-Blau → Logo-Magenta → Logo-Blau */
    background-size: 100% 200%;                         /* doppelt so hoch: es ist immer nur ein Ausschnitt zu sehen … */
    animation: divider-flow 5s ease-in-out infinite alternate;  /* … der langsam auf und ab wandert */
    z-index: 50;
    pointer-events: none;
  }
}

/* Kopfzeile über die volle Breite (bis an die Leiste): Logo links,
   Sprache + Farbmodus rechts, darunter die aktuelle Abschnittsüberschrift (rechtsbündig) */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding-right: var(--rail-w);
  background: var(--bg);
  transition: background 0.4s var(--ease);
}
.topbar .content { max-width: none; padding: 0 var(--gutter) 0 var(--edge); }   /* rechte Kante = Menü-Stapel; links gleicher Abstand wie rechts */
.topbar-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: 92px;
}
.logo-link { display: flex; align-items: center; flex-shrink: 0; }
.logo { height: 4rem; width: auto; }   /* Desktop; mobil siehe unten */
.logo--dark { display: none; }
[data-theme='dark'] .logo--light { display: none; }
[data-theme='dark'] .logo--dark { display: block; }

/* Aktuelle Abschnittsüberschrift: groß in der Seitenspalte rechts, unter der Logo-Zeile.
   Darüber stehen (per JS) die besuchten Abschnitte klein, sie schiebt sich je Zeile nach unten. */
.current-title {
  position: fixed;
  top: 100px;
  right: var(--edge);
  margin: 0;
  height: 1.6em;            /* feste Höhe, auch wenn (noch) leer */
  text-align: right;
  font-size: var(--title-size);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  padding: 0.2em 0;
}
.current-title > span { display: inline-block; }
/* Buchstaben schwenken nacheinander aus der Senkrechten in die Zeile */
.current-title .ch {
  display: inline-block;
  transform-origin: 0 100%;
  animation: ch-swing 0.55s var(--ease) both;
  animation-delay: calc(var(--i) * 40ms);
}
@keyframes ch-swing {
  from { opacity: 0; transform: rotate(-90deg); }
  30%  { opacity: 1; }
  to   { opacity: 1; transform: none; }
}

/* Werkzeuge (Sprache, Farbmodus, Burger) */
.nav-tools { display: flex; align-items: center; gap: 0.25rem; flex-shrink: 0; }
.icon-btn, .lang-switch {
  display: inline-flex; align-items: center; justify-content: center;
  height: 2.4rem; min-width: 2.4rem; padding: 0 0.6rem;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--text-muted);
  font: inherit; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em;
  text-decoration: none; cursor: pointer;
  transition: color 0.3s var(--ease);
}
.icon-btn:hover, .lang-switch:hover { color: var(--text); }
.icon-btn svg { width: 1.15rem; height: 1.15rem; }
.theme-toggle .icon-sun { display: none; }
[data-theme='dark'] .theme-toggle .icon-sun { display: block; }
[data-theme='dark'] .theme-toggle .icon-moon { display: none; }

/* Menüpunkte */
.rail-nav { position: fixed; inset: 0 0 0 auto; width: 0; z-index: 105; }   /* über dem Header (Liste oben) */
.rail-link {
  position: fixed;
  right: var(--edge);
  font-size: var(--menu-size); font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.3;
  white-space: nowrap;
  color: var(--text-muted);
  opacity: 0.75;
  text-decoration: none;
  background: var(--bg);
  padding: 0 0.25em;
  /* keine Übergänge: Position und Zustand folgen direkt der Scrollposition */
}
.rail-link:hover { color: var(--text); opacity: 1; transition: color 0.2s, opacity 0.2s; }
.rail-link.is-rail {
  right: calc((var(--rail-w) - 1.3em) / 2 + 4px);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 1.25rem;
}
.rail-link.is-done { opacity: 0; pointer-events: none; }
/* Besuchte Abschnitte: klein in der Liste oben rechts (Position per JS) */

/* Im Hochkant-Zustand zeichnet die Buchstaben-Ebene; der Link bleibt als Klickfläche */
.rail-link.is-rail, .rail-link.is-entering { color: transparent; }
/* Desktop: alle Menüpunkte mit Abschnitt werden von der Buchstaben-Ebene gezeichnet */
@media (min-width: 901px) { .rail-link.is-drawn, .rail-link.is-drawn:hover { color: transparent; background: transparent; } }
.rail-link.is-rail { background: transparent; }

/* TEST (MENU_ALIGN = 'left' in main.js): Menü linksbündig, Leiste direkt rechts der Trennlinie */
:root { --menu-left-off: calc((var(--rail-w) + var(--gutter)) / 2); }   /* Abstand Trennlinie -> Menütext */
.menu-left .rail-link { right: auto; left: calc(100% - var(--rail-w) - var(--menu-w) + var(--menu-left-off) - 0.25em); }
.menu-left .rail-link.is-rail { left: calc(100% - var(--rail-w) - var(--menu-w) + var(--menu-left-off) / 2 - 0.65em); }
.menu-left .current-title { right: auto; left: calc(100% - var(--rail-w) - var(--menu-w) + var(--menu-left-off)); text-align: left; }

/* Einzelne Buchstaben, die von der Leiste zur Überschrift fliegen */
.flyers { position: fixed; inset: 0; z-index: 110; pointer-events: none; }
.flyers span {
  position: absolute; left: 0; top: 0;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  white-space: pre;
  color: var(--text);
  opacity: 0;
  will-change: transform, opacity;
}

/* Abschnitts-Trennlinien über die ganze Breite (bis an die Leiste) */
.section { position: relative; }
.section::before {
  content: '';
  position: absolute; top: 0; left: 0;
  right: calc(-1 * var(--menu-w));
  /* border-top: 1px solid var(--rule); */
}

/* Burger + mobiles Menü */
.burger {
  display: none;
  position: relative;
  width: 2.6rem; height: 2.6rem;
  border: 0; border-radius: 999px;
  background: var(--text); cursor: pointer;
}
.burger span {
  position: absolute; left: 50%; top: 50%;
  width: 1.1rem; height: 2px; margin-left: -0.55rem;
  background: var(--bg); border-radius: 0;
  transition: transform 0.45s var(--ease), opacity 0.3s var(--ease);
}
.burger span:nth-child(1) { transform: translateY(-5px); }
.burger span:nth-child(3) { transform: translateY(5px); }
.menu-open .burger span:nth-child(1) { transform: rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-open .burger span:nth-child(3) { transform: rotate(-45deg); }

.mobile-nav {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-end;
  gap: 0.25rem;
  padding: 6rem var(--pad) 3rem;
  background: var(--bg);
  clip-path: circle(0% at calc(100% - 2.4rem) 2.4rem);
  visibility: hidden;
  transition: clip-path 0.7s var(--ease), visibility 0s linear 0.7s;
}
.menu-open .mobile-nav {
  clip-path: circle(150% at calc(100% - 2.4rem) 2.4rem);
  visibility: visible;
  transition: clip-path 0.7s var(--ease), visibility 0s;
}
.mobile-nav a {
  font-size: clamp(1.8rem, 8vw, 2.6rem); font-weight: 800;
  letter-spacing: 0.02em; text-transform: uppercase;
  color: var(--text); text-decoration: none;
  opacity: 0; transform: translateY(1.5rem);
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease), color 0.3s;
}
.mobile-nav a:hover { text-decoration: underline; }
.menu-open .mobile-nav a { opacity: 1; transform: none; }
.menu-open .mobile-nav a:nth-child(1) { transition-delay: 0.15s; }
.menu-open .mobile-nav a:nth-child(2) { transition-delay: 0.21s; }
.menu-open .mobile-nav a:nth-child(3) { transition-delay: 0.27s; }
.menu-open .mobile-nav a:nth-child(4) { transition-delay: 0.33s; }
.menu-open .mobile-nav a:nth-child(5) { transition-delay: 0.39s; }
.menu-open { overflow: hidden; }

@media (max-width: 900px) {
  body { padding-right: 0; }
  .section::before { right: 0; }
  .topbar { padding-right: 0; }
  .topbar .content { padding-left: 1.5rem; }   /* Handy: keine Leiste, also schmaler Rand */
  .topbar-row { height: 76px; }
  .logo { height: 2.8rem; }
  html { scroll-padding-top: 6rem; }
  .section { scroll-margin-top: calc(0.75rem - clamp(4rem, 9vw, 7rem)); }   /* Sprung: Überschrift ca. 2rem unter dem Header statt Abschnitts-Innenabstand */
  .rail-nav, .current-title, .flyers { display: none; }
  .nav-tools { margin-left: auto; }
  .burger { display: block; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { min-height: 88vh; display: flex; align-items: center; padding: 8rem 0 4rem; }
.hero .content { container-type: inline-size; position: relative; z-index: 1; }
/* Animierte Hintergrundgrafik (assets/bg.svg) nur im Einstieg: füllt die freie Fläche
   zwischen Header und Footer (links der Menü-Spalte), zurückgenommen hinter dem Text.
   Im Bühnen-Modus blendet sie per JS zusammen mit dem Einstieg ein/aus. */
:root { --hero-bg-opacity: 0.35; }
.hero { position: relative; }
.hero-bg {
  position: absolute;
  top: 0; left: 0; right: 0;
  margin: 0 auto;
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  opacity: var(--hero-bg-opacity);
  pointer-events: none;
  z-index: 0;
}
.staged .hero-bg {
  position: fixed;
  top: 40px;                                         /* oberer Rand der Grafik ist leer: darf unter die Logo-Zeile reichen */
  left: var(--edge);
  width: calc(100vw - var(--edge) - var(--rail-w) - var(--menu-w) - var(--pad));
  height: calc(100vh - 40px - var(--footer-h) - 8px);
  max-width: none;
  margin: 0;
  object-position: center top;
  will-change: transform, opacity;
}
[data-theme='dark'] .hero-bg { filter: invert(1) hue-rotate(180deg); }   /* dunkle Linie hell auf dunklem Grund */
.hero-title {
  font-size: clamp(3.25rem, 11.5cqi, 12rem);   /* skaliert mit der Breite der Inhaltsspalte */
  font-weight: 800; letter-spacing: -0.045em; line-height: 0.95;
  color: var(--accent);  /* Claim in Markenblau #1102b5 (Dark Mode: helleres Blau) */
  margin-bottom: 3rem;   /* Abstand zum hero-lead */
}
/* Tipp-Effekt des Claims (Steuerung in main.js) */
.hero-title.is-typing .tw-char { visibility: hidden; }
.hero-title.is-typing .tw-char.is-typed { visibility: visible; }
.hero-title .tw-char.is-caret { position: relative; }
.hero-title .tw-char.is-caret::after {          /* Cursor hinter dem zuletzt getippten Zeichen */
  content: '';
  position: absolute;
  top: 0.08em; bottom: 0.02em; right: -0.08em;
  width: 0.06em;
  background: currentColor;
  animation: caret-blink 0.9s steps(1) infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }
.hero-lead { font-size: clamp(1.35rem, 3vw, 2.1rem); line-height: 1.4; color: var(--text-muted); max-width: 34em; margin-bottom: 2.2rem; }   /* Breite in em: wächst mit der Schrift; fester Umbruch per <br> */
@media (max-width: 700px) { .hero-lead br { display: none; } }   /* Handy: natürlicher Umbruch */
.hero-lead-main { display: block; font-size: 1.55em; line-height: 1.25; color: var(--text); margin-bottom: 0.15em; }   /* erste Zeile größer, eigene Zeile */
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* ==========================================================================
   Lösungen – Karten
   ========================================================================== */
/* Spaltenzahl richtet sich nach der Breite des Inhaltsbereichs (nicht des Bildschirms),
   da die Menü-Spalte rechts Platz belegt. minmax(0, 1fr): lange Wörter sprengen keine Spalte. */
.section .content { container-type: inline-size; }
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}
@container (max-width: 960px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 480px) { .cards { grid-template-columns: 1fr; } }
.card {
  padding: 1.75rem 1.4rem;
  border: 3px solid var(--text);   /* schwarz (im Dark Mode hell, wie Buttons) */
  border-radius: 0;
  background: var(--surface);
}
.card-icon { width: 2.6rem; height: 2.6rem; margin-bottom: 1.4rem; color: var(--text); }
.card-icon svg { width: 100%; height: 100%; }
.card h3 { font-size: 1.75rem; font-weight: 750; hyphens: auto; }
.card p { color: var(--text-muted); margin: 0; }

/* TEST: Card-Border mit Farbverlauf (Logo-Blau → Magenta), ohne Animation – Block löschen = wieder schwarz */
.card { border-image: linear-gradient(135deg, #dd00dd, #dd00dd) 1; }

/* ---------- Banner ---------- */
.banner {
  margin-top: clamp(3.5rem, 8vw, 6rem);
  text-align: center;
}
.banner h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); font-weight: 800; max-width: 44rem; margin-left: auto; margin-right: auto; }
.banner p { font-size: 1.15rem; color: var(--text-muted); max-width: 40rem; margin: 0 auto; }
.banner .banner-button { margin-top: 2rem; }

/* ==========================================================================
   Technologien
   ========================================================================== */
/* Eine Zeile je Bereich: "Bereich: Technik // Technik // …" */
.tech-list {
  list-style: none;
  margin: 2.5rem 0 0;
  padding: 0;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  line-height: 1.5;
  color: var(--text-muted);
}
.tech-list li + li { margin-top: 1rem; }
.tech-list strong { color: var(--text); font-weight: 750; }

/* ==========================================================================
   Kunden (schlicht: Logos ohne Kacheln)
   ========================================================================== */
.client-logos {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: center;
  gap: 5rem 4.5rem;
  margin-top: 7.5rem;
}
@media (max-width: 900px) { .client-logos { gap: 2.5rem 2.25rem; margin-top: 3.75rem; } }   /* Handy: halbe Abstände */
.client-logo {
  height: 5rem; width: auto; max-width: 9rem;
  object-fit: contain;
  /* filter: grayscale(1);
  opacity: 0.6; */
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.client-logo:hover { filter: none; opacity: 1; }
/* Dark Mode: Logos farbig auf heller Fläche – viele haben dunkle Schrift bzw. einen
   festen (weißen/farbigen) Hintergrund und wären auf dunklem Grund sonst nicht lesbar */
[data-theme='dark'] .client-logo {
  box-sizing: content-box;
  padding: 0.6rem 0.9rem;
  background: #f4f3ef;
}

/* ==========================================================================
   Über uns
   ========================================================================== */
.team {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem 3rem;
  margin-top: 2.5rem;
}
@media (max-width: 900px) { .team { row-gap: 3.5rem; } }   /* Handy: mehr Luft zwischen den Vitas */
.person { display: flex; gap: 1.5rem; align-items: flex-start; }
/* Einleitung über dem Team */
/* Standard-Fließtext (Einleitung "Über uns", Vitas): Grundschrift, gedämpfte Farbe, Absatzabstand */
.prose p { color: var(--text-muted); margin: 0; }
.prose p:not(.role) + p { margin-top: 0.8rem; }
.about-intro { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.avatar {
  flex-shrink: 0;
  width: 112px; height: 112px;
  border-radius: 50%;
  overflow: hidden;
  display: grid; place-items: center;
  font-size: 1.8rem; font-weight: 700; color: var(--text-muted);
  background: var(--line);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
/* Fotos: rund auf Neongelb – Weiß im Bild wird per multiply zur Hintergrundfarbe, die Punkte bleiben dunkel */
.avatar:has(img) { background: #e8ff00; }
.avatar img { mix-blend-mode: multiply; }
.person h3 { font-size: 1.3rem; margin-bottom: 0.15rem; }
.person .role { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.7rem; }
@media (min-width: 901px) { .person > div:last-child { margin-top: 3rem; } }   /* Desktop: Name/Text versetzt zum Bild */
@media (max-width: 900px) { .person { flex-direction: column; align-items: center; text-align: center; } }   /* Handy: Bild über Text, zentriert */

/* ==========================================================================
   Kontakt
   ========================================================================== */
.contact { margin-top: 2.5rem; max-width: 60rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem 1.5rem; }
.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field--full { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }
.form-label { font-size: 0.9rem; font-weight: 650; }
.form-input, .form-textarea {
  width: 100%;
  padding: 0.5rem .75rem;
  font: inherit; color: var(--text);
  background: var(--surface);
  border: 3px solid var(--text);
  border-radius: 0;
}
.form-textarea { resize: vertical; min-height: 9rem; }
.form-input:focus, .form-textarea:focus { outline: 2px solid var(--text); outline-offset: 0; }   /* Rahmen ist schon schwarz: Fokus als zusätzliche Linie */
.captcha-row { display: flex; align-items: center; gap: 0.8rem; }
.captcha-question {
  flex-shrink: 0;
  padding: 0.85rem 1rem;
  border: 3px solid var(--text);
  border-radius: 0;
  font-weight: 700; font-variant-numeric: tabular-nums;
  user-select: none;
}
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { color: #c4103f; font-size: 0.88rem; margin: 0; }
[data-theme='dark'] .form-error { color: #ff7a9a; }
.form-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem; margin-top: 1.5rem; }
.checkbox-row { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.92rem; color: var(--text-muted); max-width: 40rem; }
/* Eigene Checkbox: 3px Rahmen wie Felder und Buttons, Haken bei Auswahl */
.checkbox-row input {
  appearance: none; -webkit-appearance: none;
  flex-shrink: 0;
  width: 1.4rem; height: 1.4rem;
  margin: 0.1rem 0 0;
  border: 3px solid var(--text);
  border-radius: 0;
  background: var(--surface) center / 80% no-repeat;
  cursor: pointer;
}
.checkbox-row input:checked {
  background-color: var(--text);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23f4f3ef' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
}
[data-theme='dark'] .checkbox-row input:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23111111' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
}
.checkbox-row input:focus-visible { outline: 2px solid var(--text); outline-offset: 0; }
.form-success { display: flex; gap: 1rem; align-items: center; font-size: 1.1rem; }
.form-error--submit { margin-top: 1rem; font-size: 0.95rem; text-align: right; }   /* unter Roboter-Box und Button */
.contact-form button[disabled] { opacity: 0.6; cursor: progress; }

/* ALTCHA-Widget ("Ich bin kein Roboter") im Stil der Formularfelder: flach, 3px Rahmen, keine Rundung */
.altcha-field {
  --altcha-border-width: 3px;
  --altcha-border-radius: 0;
  --altcha-border-color: var(--text);
  --altcha-color-base: var(--surface);
  --altcha-color-base-content: var(--text);
  --altcha-color-neutral: var(--text);
  --altcha-color-neutral-content: var(--text-muted);
  --altcha-color-primary: var(--text);
  --altcha-color-primary-content: var(--bg);
  --altcha-color-success: var(--text);
  --altcha-color-success-content: var(--bg);
  --altcha-color-error: #c4103f;
  --altcha-checkbox-border-color: var(--text);
  --altcha-checkbox-border-radius: 0;
  --altcha-checkbox-border-width: 3px;
  --altcha-checkbox-size: 1.4rem;
  --altcha-checkbox-outline: 2px solid var(--text);
  --altcha-checkbox-outline-offset: 0;
  --altcha-spinner-color: var(--text);
  --altcha-shadow: none;
  --altcha-max-width: 20rem;
  --altcha-padding: 0.85rem 1rem;
  display: block;
  font-size: 0.95rem;
}
[data-theme='dark'] .altcha-field { --altcha-color-error: #ff7a9a; }
/* Unter dem Formular: Roboter-Box und Senden-Button rechtsbündig in einer Zeile */
.contact-form .form-footer { justify-content: flex-end; }
.contact-form .form-footer .altcha-field { flex: 0 1 16rem; }
.contact-form .form-footer .button { align-self: stretch; }
.form-success svg { width: 2.4rem; height: 2.4rem; flex-shrink: 0; }

/* ==========================================================================
   Rechtliche Seiten
   ========================================================================== */
.legal { padding: 9rem 0 5rem; }
@media (max-width: 900px) { .legal { padding-top: 7rem; } }
.legal-card { max-width: 52rem; }
.legal-card h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); font-weight: 800; }
.legal-card h2 { font-size: 1.2rem; margin-top: 2.2rem; }
.legal-card .lead { font-size: 1.15rem; color: var(--text-muted); }
.legal-card p { color: var(--text-muted); }
.legal-note { font-size: 0.9rem; padding: 0.9rem 1.1rem; border: 1px solid var(--line); border-radius: 0; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { padding: 2rem 0 2.5rem; }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}
@media (max-width: 600px) { .footer-inner { justify-content: center; text-align: center; } }
.footer-inner .logo { height: 2rem; }
.footer-nav { display: flex; gap: 1.4rem; }
.footer-nav a { color: var(--text); text-decoration: none; font-weight: 550; }
.footer-nav a:hover { text-decoration: underline; }
.copyright { color: var(--text-muted); }

/* Fester Footer: schmale Leiste am unteren Rand, immer sichtbar.
   Links neben dem Menü-Stapel; das Logo steht schon im Header. */
:root { --footer-h: 44px; }
body { padding-bottom: var(--footer-h); }
.site-footer {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 85;
  padding: 0 calc(var(--rail-w) + var(--menu-w)) 0 0;
  background: var(--bg);
  transition: background 0.4s var(--ease);
}
.site-footer .content { max-width: none; padding: 0 var(--gutter) 0 var(--edge); }   /* links wie Logo */
.site-footer .footer-inner {
  height: var(--footer-h);
  padding: 0;
  border-top: 0;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 1.5rem;
  font-size: 0.85rem;
}
.site-footer .footer-inner > a:first-child { display: none; }   /* Logo */
.site-footer .copyright { order: -1; }
@media (max-width: 900px) {
  .site-footer { padding-right: 0; }
  .site-footer .content { padding-left: 1.5rem; }
  .site-footer .footer-inner { justify-content: center; gap: 1.2rem; font-size: 0.8rem; }
}

/* ==========================================================================
   Scroll-Reveal (dezent)
   ========================================================================== */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--delay, 0s);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* Pfeil unten: "weiter scrollen" (Element erzeugt main.js, nicht im letzten Abschnitt) */
/* VORLÄUFIG AUSGEBLENDET – diese Zeile löschen, um den Pfeil wieder zu zeigen */
.scroll-hint { display: none !important; }
.scroll-hint {
  position: fixed;
  left: 0; right: 0;
  bottom: calc(var(--footer-h) + 0.6rem);
  width: 2.2rem; height: 2.2rem;
  margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  opacity: var(--menu-idle-opacity);
  z-index: 40;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
  animation: hint-bob 2.4s ease-in-out infinite;
}
.scroll-hint svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: square; }
.scroll-hint:hover, .scroll-hint:focus-visible { opacity: 1; }
.scroll-hint.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
@media (min-width: 901px) { .scroll-hint { left: var(--edge); right: calc(var(--rail-w) + var(--menu-w) + var(--pad)); } }   /* mittig über dem Text (gleiche Innenabstände wie .content) */
body:has(.hero.is-pending) .scroll-hint { opacity: 0; visibility: hidden; pointer-events: none; }   /* erst mit Hero-Lead + Buttons */
@keyframes hint-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

@keyframes divider-flow { from { background-position: 0 0%; } to { background-position: 0 100%; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Bühne (nur Desktop, per JS aktiviert über .staged am <html>)
   Abschnitte dienen als Scrollstrecke, ihr Inhalt liegt fest im Bildschirm und
   kommt aus dem Hintergrund bzw. tritt zurück (Steuerung in main.js).
   ========================================================================== */
.staged .section,
.staged .hero { padding: 0; min-height: 0; }
.staged .section > .content,
.staged .hero > .content {
  position: fixed;
  top: 0; left: 0;
  right: calc(var(--rail-w) + var(--menu-w));
  width: auto;              /* Breite aus left/right (nicht 100 % des Bildschirms) */
  margin: 0 auto;
  z-index: 1;
  will-change: transform, opacity;
}
.staged .reveal { opacity: 1; transform: none; }

/* Hero: Lead + Buttons erst nach der Tipp-Animation einblenden (Klasse setzt main.js) */
.js .hero.is-pending .hero-lead.reveal,
.js .hero.is-pending .hero-actions.reveal { opacity: 0; transform: translateY(20px); pointer-events: none; }
