/* ============================================================
   Nafil V4 — „Blaupause"
   Nachtblau + Papier + Kobalt · Space Grotesk / IBM Plex
   Designsystem: ../DESIGN.md
   ============================================================ */

/* ---------- Fonts (self-hosted, kein CDN) ---------- */
@font-face {
  font-family: "Space Grotesk";
  src: url("assets/fonts/space-grotesk-var.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/fonts/ibm-plex-sans-var.woff2") format("woff2");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --nacht: #0d1b2a;
  --nacht-soft: #14263b;
  --papier: #f6f4ee;
  --weiss: #ffffff;
  --kobalt: #2b59ff; /* trägt Weiß (5,3:1) — nie Nacht-Text darauf */
  --kobalt-deep: #1f3ec2; /* Textakzent auf hell — AA-konform (7,6:1 auf Papier) */
  --kobalt-soft: #e4eaff;
  --himmel: #6c8cff; /* Akzent auf dunklem Grund (5,7:1 auf Nacht) */
  --muted: #55606c;
  --muted-dark: #8fa3b8;
  --line: #e3e1d8;
  --line-dark: rgba(255, 255, 255, 0.08);
  --grid-line: rgba(108, 140, 255, 0.03);

  --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --shadow-sm: 0 2px 8px rgba(13, 27, 42, 0.07);
  --shadow-md: 0 10px 30px rgba(13, 27, 42, 0.11);
  --shadow-lg: 0 24px 60px rgba(13, 27, 42, 0.18);

  --radius: 16px;
  --container: 1100px;
  --section-gap: clamp(4.5rem, 10vw, 8rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --z-sticky: 40;
  --z-header: 50;
  --z-ctabar: 60;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--nacht);
  background-color: var(--nacht);
  transition: background-color 0.7s ease;
  overflow-x: clip;
}
body[data-bg="light"] {
  background-color: var(--papier);
}
/* Blaupausen-Raster: ein statisches Layer, blendet mit dem Farbwechsel.
   Dezenz-Maßstab: Zifferblatt einer Uhr — im Zweifel Deckkraft senken. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(
      0deg,
      var(--grid-line) 0 1px,
      transparent 1px 64px
    ),
    repeating-linear-gradient(90deg, var(--grid-line) 0 1px, transparent 1px 64px);
  opacity: 1;
  transition: opacity 0.7s ease;
}
body[data-bg="light"]::before {
  opacity: 0;
}
/* Fallback ohne JS: helle Sektionen bekommen festen Grund */
html:not(.js) section[data-bg="light"],
html:not(.js) .marquee {
  background-color: var(--papier);
}

img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
}
::selection {
  background: var(--kobalt);
  color: #fff;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}

/* ---------- Utilities ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

section {
  position: relative;
  padding-block: var(--section-gap);
}

/* Blattlabel: einzige Hintergrund-Typo — Mono-Vermerk wie auf einer Zeichnung */
.sheet-label {
  position: absolute;
  top: clamp(1.5rem, 4vw, 2.5rem);
  right: clamp(1.25rem, 4vw, 2.5rem);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(13, 27, 42, 0.28);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}
.sheet-label::before {
  content: "+";
  margin-right: 0.6em;
}
.on-dark .sheet-label,
section[data-bg="dark"] .sheet-label {
  color: rgba(143, 163, 184, 0.32);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--kobalt-deep);
  margin-bottom: 1.25rem;
}
.on-dark .kicker {
  color: var(--himmel);
}
.kicker::before {
  content: "";
  width: 2.25rem;
  height: 2px;
  background: var(--kobalt);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s var(--ease-out) 0.15s;
}
.in-view .kicker::before,
html:not(.js) .kicker::before {
  transform: scaleX(1);
}

.section-title {
  font-size: clamp(1.8rem, 4.2vw, 2.75rem);
  max-width: 22ch;
}
.section-intro {
  margin-top: 1rem;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.06rem;
}
.on-dark {
  color: #fff;
}
.on-dark .section-intro {
  color: var(--muted-dark);
}

/* Scroll-Reveal (additiv, ohne JS sichtbar) */
html:not(.js) .reveal {
  opacity: 1;
  transform: none;
}
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.in-view .reveal,
.reveal.in-view {
  opacity: 1;
  transform: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.9rem;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out),
    background-color 0.25s, border-color 0.25s;
  will-change: transform;
}
.btn-primary {
  background: var(--kobalt);
  color: #fff;
  box-shadow: 0 8px 24px rgba(43, 89, 255, 0.35);
}
.btn-primary:hover {
  background: #1f4ae0;
  box-shadow: 0 12px 32px rgba(43, 89, 255, 0.45);
}
.btn-ghost {
  border-color: var(--line-dark);
  color: #fff;
}
.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.35);
}
.btn-ghost-light {
  border-color: var(--line);
  color: var(--nacht);
}
.btn-ghost-light:hover {
  border-color: var(--muted);
}

/* ---------- Scroll-Progress + Header ---------- */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--kobalt);
  z-index: calc(var(--z-header) + 1);
  pointer-events: none;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  transition: background-color 0.4s, box-shadow 0.4s, backdrop-filter 0.4s;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.site-header.scrolled {
  background: rgba(13, 27, 42, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}
.wordmark {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.wordmark span {
  color: var(--himmel);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.site-nav a:not(.btn) {
  position: relative;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding-block: 0.35rem;
  transition: color 0.25s;
}
.site-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--himmel);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease-out);
}
.site-nav a:not(.btn):hover {
  color: #fff;
}
.site-nav a:not(.btn):hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.site-nav .btn {
  padding: 0.6rem 1.35rem;
  font-size: 0.92rem;
}
@media (max-width: 860px) {
  .site-nav a:not(.btn) {
    display: none;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: 8rem 5rem;
  color: #fff;
  overflow: hidden;
}
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: clamp(2.25rem, 6.2vw, 4.1rem);
  max-width: 17ch;
  font-weight: 600;
}
.hero h1 em {
  font-style: normal; /* Space Grotesk hat kein Kursiv — Auszeichnung über Farbe */
  color: var(--himmel);
}
.line-mask {
  display: block;
  overflow: hidden;
  padding-block: 0.06em;
}
.line-mask > span {
  display: block;
  transform: translateY(110%);
  animation: line-up 0.9s var(--ease-out) forwards;
  animation-delay: var(--d, 0s);
}
@keyframes line-up {
  to {
    transform: translateY(0);
  }
}
html:not(.js) .line-mask > span {
  transform: none;
  animation: none;
}

.hero-sub {
  margin-top: 1.75rem;
  max-width: 54ch;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--muted-dark);
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}

.speed-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 2.25rem;
  font-size: 0.9rem;
  color: var(--muted-dark);
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  background: rgba(255, 255, 255, 0.03);
}
.speed-badge strong {
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.speed-badge .bolt {
  color: var(--himmel);
}

.hero-fade-in {
  opacity: 0;
  animation: fade-in 0.9s ease forwards;
  animation-delay: var(--d, 0s);
}
@keyframes fade-in {
  to {
    opacity: 1;
  }
}
html:not(.js) .hero-fade-in {
  opacity: 1;
  animation: none;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px;
  height: 42px;
  border: 2px solid var(--line-dark);
  border-radius: 999px;
}
.scroll-hint::after {
  content: "";
  position: absolute;
  top: 7px;
  left: 50%;
  width: 4px;
  height: 8px;
  margin-left: -2px;
  border-radius: 4px;
  background: var(--himmel);
  animation: hint 1.8s ease-in-out infinite;
}
@keyframes hint {
  0%,
  100% {
    transform: translateY(0);
    opacity: 1;
  }
  55% {
    transform: translateY(12px);
    opacity: 0.2;
  }
}

/* ---------- Trust-Strip ---------- */
.trust {
  padding-block: 0 4.5rem;
  color: #fff;
}
.trust .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--line-dark);
  border-block: 1px solid var(--line-dark);
}
.trust-item {
  background: var(--nacht);
  padding: 1.75rem 1.5rem;
  text-align: center;
}
.trust-item .num {
  font-family: var(--font-mono);
  font-size: 1.9rem;
  font-weight: 500;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.trust-item .num em {
  font-style: normal;
  color: var(--himmel);
}
.trust-item .label {
  margin-top: 0.25rem;
  font-size: 0.88rem;
  color: var(--muted-dark);
}

/* ---------- Problem: Zettelchaos → System ---------- */
.problem-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-top: 3rem;
}
.zettel {
  position: relative;
  background: var(--weiss);
  border-radius: 4px;
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: var(--shadow-md);
  font-size: 1rem;
  color: var(--nacht);
  transform: rotate(var(--rot, 0deg)) translate(var(--tx, 0), var(--ty, 0));
  transition: transform 0.9s var(--ease-out), box-shadow 0.9s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.zettel::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 74px;
  height: 22px;
  transform: translateX(-50%) rotate(-2deg);
  background: rgba(43, 89, 255, 0.14);
  border-left: 1px dashed rgba(43, 89, 255, 0.28);
  border-right: 1px dashed rgba(43, 89, 255, 0.28);
}
.zettel strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.12rem;
  margin-bottom: 0.4rem;
}
.zettel p {
  color: var(--muted);
  font-size: 0.95rem;
}
html.js .problem-grid:not(.ordered) .zettel:nth-child(1) {
  --rot: -2.5deg;
  --ty: 8px;
}
html.js .problem-grid:not(.ordered) .zettel:nth-child(2) {
  --rot: 1.5deg;
  --ty: -6px;
}
html.js .problem-grid:not(.ordered) .zettel:nth-child(3) {
  --rot: -1deg;
  --ty: 10px;
  --tx: 4px;
}
html.js .problem-grid:not(.ordered) .zettel:nth-child(4) {
  --rot: 2deg;
  --ty: -4px;
  --tx: -4px;
}
html.js .problem-grid:not(.ordered) .zettel:nth-child(5) {
  --rot: -1.5deg;
  --ty: 6px;
}
.problem-grid.ordered .zettel {
  --rot: 0deg;
  --tx: 0;
  --ty: 0;
  box-shadow: var(--shadow-sm);
}
.problem-grid.ordered .zettel:nth-child(1) {
  --d: 0s;
}
.problem-grid.ordered .zettel:nth-child(2) {
  --d: 0.08s;
}
.problem-grid.ordered .zettel:nth-child(3) {
  --d: 0.16s;
}
.problem-grid.ordered .zettel:nth-child(4) {
  --d: 0.24s;
}
.problem-grid.ordered .zettel:nth-child(5) {
  --d: 0.32s;
}

.problem-punch {
  margin-top: 4rem;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  max-width: 26ch;
}
.problem-punch em {
  font-style: normal;
  color: var(--kobalt-deep);
}

/* ---------- Lösung: Sticky-Spalte (7i7-Moment) ---------- */
.loesung-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  margin-top: 3rem;
}
@media (min-width: 960px) {
  .loesung-grid {
    grid-template-columns: 0.85fr 1.15fr;
    align-items: start;
  }
  .loesung-links {
    position: sticky;
    top: 110px;
  }
}
.loesung-links .section-title {
  max-width: 16ch;
}
.solution-banner {
  margin-top: 2rem;
  background: var(--nacht);
  color: #fff;
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
}
.solution-banner strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
}
.solution-banner span {
  color: var(--muted-dark);
  font-size: 0.98rem;
}

.pillar {
  background: var(--weiss);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-sm);
}
.pillar + .pillar {
  margin-top: 1.5rem;
}
.pillar .pillar-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--kobalt-soft);
  color: var(--kobalt-deep);
  display: grid;
  place-items: center;
  margin-bottom: 1.25rem;
}
.pillar h3 {
  font-size: 1.45rem;
  margin-bottom: 0.6rem;
}
.pillar > p {
  color: var(--muted);
  margin-bottom: 1.25rem;
}
.pillar ul {
  list-style: none;
  display: grid;
  gap: 0.6rem;
}
.pillar li {
  display: flex;
  gap: 0.65rem;
  align-items: baseline;
  font-size: 0.98rem;
}
.pillar li::before {
  content: "✓";
  color: var(--kobalt-deep);
  font-weight: 700;
  flex-shrink: 0;
}

/* Vorher/Nachher-Slider */
.ba-wrap {
  margin-top: 4rem;
}
.ba-heading {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}
.ba {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 9;
  max-height: 520px;
  width: 100%;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}
.ba-side {
  position: absolute;
  inset: 0;
  padding: clamp(1rem, 3vw, 2.5rem);
  overflow: hidden;
}
.ba-before {
  background: repeating-linear-gradient(
      0deg,
      transparent 0 31px,
      rgba(13, 27, 42, 0.05) 31px 32px
    ),
    #edf0f7;
}
.ba-after {
  background: var(--nacht);
  clip-path: inset(0 0 0 var(--cut, 50%));
}
.ba-label {
  position: absolute;
  top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  z-index: 3;
}
.ba-before .ba-label {
  left: 1rem;
  background: rgba(13, 27, 42, 0.8);
  color: #fff;
}
.ba-after .ba-label {
  right: 1rem;
  background: var(--kobalt);
  color: #fff;
}
.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--cut, 50%);
  width: 3px;
  margin-left: -1.5px;
  background: var(--kobalt);
  z-index: 4;
  cursor: ew-resize;
}
.ba-handle::after {
  content: "◂ ▸";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--kobalt);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 20px rgba(43, 89, 255, 0.5);
}

.mess {
  position: relative;
  height: 100%;
}
.mess-note {
  position: absolute;
  background: #fff;
  padding: 0.7rem 0.9rem;
  font-size: clamp(0.62rem, 1.4vw, 0.85rem);
  color: var(--muted);
  box-shadow: var(--shadow-sm);
  border-radius: 3px;
  white-space: nowrap;
}
.mess-note.n1 {
  top: 12%;
  left: 4%;
  transform: rotate(-6deg);
}
.mess-note.n2 {
  top: 34%;
  left: 22%;
  transform: rotate(3deg);
}
.mess-note.n3 {
  top: 58%;
  left: 7%;
  transform: rotate(-2deg);
}
.mess-note.n4 {
  top: 76%;
  left: 26%;
  transform: rotate(5deg);
}
.mess-note.n5 {
  top: 22%;
  left: 46%;
  transform: rotate(2deg);
}
.mess-note.n6 {
  top: 66%;
  left: 52%;
  transform: rotate(-4deg);
}
.mess-note.excel {
  background: #e7efe4;
  border-top: 3px solid #1d6f42;
}

.mini-ui {
  height: 100%;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  min-width: 560px;
}
.mini-side {
  background: var(--nacht-soft);
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 8px;
  align-content: start;
}
.mini-side i {
  display: block;
  height: 9px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
}
.mini-side i:first-child {
  background: var(--kobalt);
  width: 60%;
}
.mini-main {
  display: grid;
  grid-template-rows: 44px 1fr;
  gap: 10px;
  min-width: 0;
}
.mini-bar {
  background: var(--nacht-soft);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-inline: 12px;
}
.mini-bar i {
  height: 9px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  width: 70px;
}
.mini-bar i:last-child {
  margin-left: auto;
  width: 90px;
  background: var(--kobalt);
}
.mini-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  min-height: 0;
}
.mini-card {
  background: var(--nacht-soft);
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 8px;
  align-content: start;
}
.mini-card b {
  display: block;
  height: 12px;
  width: 55%;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.25);
}
.mini-card i {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
}
.mini-card i.hl {
  background: rgba(108, 140, 255, 0.55);
  width: 40%;
}

/* Vergleichstabelle */
.compare {
  margin-top: 4rem;
  overflow-x: auto;
}
.compare table {
  width: 100%;
  border-collapse: collapse;
  background: var(--weiss);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  min-width: 560px;
}
.compare th,
.compare td {
  padding: 1.1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.98rem;
}
.compare thead th {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  background: #f4f6fb;
}
.compare thead th.me {
  color: #fff;
  background: var(--nacht);
}
.compare td.me {
  background: rgba(43, 89, 255, 0.06);
  font-weight: 600;
}
.compare .no {
  color: #b3372a;
}
.compare .yes {
  color: #1d7a3f;
}
.compare tbody tr:last-child td {
  border-bottom: none;
}

/* ---------- Referenzen: horizontale Galerie (aus V2, in V1-Optik) ---------- */
.werke {
  padding-block: 0;
  color: #fff;
}
.werke-pin {
  position: relative;
}
.werke-head {
  position: relative;
  padding-top: var(--section-gap);
  padding-bottom: 2.5rem;
}
.werke-track {
  display: flex;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
  will-change: transform;
}
@media (min-width: 861px) and (pointer: fine) {
  html.js .werke-pin {
    height: var(--pin-h, 400vh);
  }
  html.js .werke-view {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 88px;
  }
  html.js .werke-view .werke-head {
    padding-top: 1.25rem;
    padding-bottom: 1.75rem;
  }
  html.js .werke-view .werke-head .section-title {
    font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  }
  html.js .werke-view .werk {
    width: min(56vw, 620px);
  }
  html.js .werke-view .werke-foot {
    margin-top: 1.5rem;
    padding-bottom: 0;
  }
}
@media (min-width: 861px) and (pointer: fine) and (max-height: 850px) {
  html.js .werke-view .werk {
    width: min(46vw, 520px);
  }
}
/* Mobil/Touch/No-JS: nativer Horizontal-Scroll mit Snap */
.werke-track.native {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 2rem;
  -webkit-overflow-scrolling: touch;
}
.werke-track.native .werk {
  scroll-snap-align: center;
}
html:not(.js) .werke-track {
  overflow-x: auto;
  padding-bottom: 2rem;
}

.werk {
  flex: 0 0 auto;
  width: min(72vw, 720px);
  background: var(--weiss);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--nacht);
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-rows: auto 1fr;
}
@media (max-width: 860px) {
  .werk {
    width: 84vw;
  }
}
.werk-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #e7eaf2;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.werk-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.media-slot {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 0.5rem;
  text-align: center;
  background: repeating-linear-gradient(
      0deg,
      rgba(43, 89, 255, 0.07) 0 1px,
      transparent 1px 24px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(43, 89, 255, 0.07) 0 1px,
      transparent 1px 24px
    ),
    #eaeef8;
  border: 2px dashed rgba(43, 89, 255, 0.4);
  color: var(--muted);
}
.media-slot .slot-t {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--kobalt-deep);
}
.media-slot code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  opacity: 0.85;
}
.werk-body {
  padding: 1.5rem 1.6rem 1.6rem;
  display: grid;
  gap: 0.5rem;
  align-content: start;
}
.werk-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.werk-idx {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--kobalt-deep);
}
.werk-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--kobalt-deep);
  background: var(--kobalt-soft);
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
}
.werk h3 {
  font-size: 1.4rem;
}
.werk p {
  color: var(--muted);
  font-size: 0.96rem;
}
/* Akte-Block: Leistung / System / Ergebnis in Zeichnungs-Notation */
.werk-akte {
  margin-top: 0.75rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.35rem;
}
.werk-akte div {
  display: flex;
  gap: 0.7rem;
  align-items: baseline;
}
.werk-akte dt {
  flex: 0 0 5.4rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.werk-akte dd {
  margin: 0;
  font-size: 0.88rem;
  color: var(--nacht);
}
.werk-akte dd .tbd {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}
.werk-link {
  margin-top: 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--kobalt-deep);
}
.werke-foot {
  padding-bottom: 2rem;
  margin-top: 2rem;
  font-size: 0.92rem;
  color: var(--muted-dark);
}

/* ---------- Live-Demos (Karriaro-Prinzip) ---------- */
.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}
.demo-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--weiss);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--nacht);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.demo-card.live:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}
.demo-screen {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--nacht);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.demo-screen .demo-icon {
  color: var(--himmel);
  opacity: 0.9;
  transition: transform 0.4s var(--ease-out);
}
.demo-card.live:hover .demo-icon {
  transform: scale(1.15);
}
.demo-screen .demo-status {
  position: absolute;
  bottom: 0.9rem;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted-dark);
}
.demo-card.live .demo-status {
  background: var(--kobalt);
  color: #fff;
}
.demo-body {
  padding: 1.4rem 1.5rem 1.5rem;
}
.demo-body h3 {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}
.demo-body p {
  color: var(--muted);
  font-size: 0.94rem;
}
.demo-foot {
  margin-top: 2.25rem;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 58ch;
}

/* ---------- Prozess: Sticky-Headline (7i7-Moment) ---------- */
.prozess-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
}
@media (min-width: 900px) {
  .prozess-grid {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
  }
  .prozess-links {
    position: sticky;
    top: 110px;
  }
}
.prozess-links .btn {
  margin-top: 1.75rem;
}
.process {
  position: relative;
  display: grid;
  gap: 2.5rem;
  padding-left: 2.5rem;
}
.process::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line);
}
.process-line {
  position: absolute;
  left: 11px;
  top: 8px;
  width: 2px;
  height: calc(100% - 16px);
  background: var(--kobalt);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1.4s var(--ease-out);
}
.process.in-view .process-line,
html:not(.js) .process-line {
  transform: scaleY(1);
}
.step {
  position: relative;
}
.step::before {
  content: attr(data-nr);
  position: absolute;
  left: -2.5rem;
  top: 2px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--papier);
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  transition: border-color 0.5s, background-color 0.5s, color 0.5s;
  transition-delay: var(--d, 0s);
}
.process.in-view .step::before,
html:not(.js) .step::before {
  border-color: var(--kobalt-deep);
  background: var(--kobalt-deep);
  color: #fff;
}
.step h3 {
  font-size: 1.3rem;
}
.step p {
  margin-top: 0.4rem;
  color: var(--muted);
  max-width: 52ch;
}

/* ---------- Über mich (1:1 aus V1) ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-top: 3rem;
  align-items: center;
}
@media (min-width: 860px) {
  .about-grid {
    grid-template-columns: 380px 1fr;
  }
}
.portrait {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--nacht);
  position: relative;
  box-shadow: var(--shadow-md);
}
.portrait .monogram {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 7rem;
  font-weight: 500;
  color: var(--himmel);
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about-copy p {
  margin-bottom: 1.1rem;
  max-width: 56ch;
}
.about-copy .lead {
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1.35;
}
.about-copy .muted {
  color: var(--muted);
}
.about-sign {
  margin-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--kobalt-deep);
}

/* ---------- FAQ ---------- */
.faq-list {
  margin-top: 3rem;
  display: grid;
  gap: 0.9rem;
  max-width: 820px;
}
.faq-list details {
  background: var(--weiss);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.3s;
}
.faq-list details[open] {
  box-shadow: var(--shadow-sm);
}
.faq-list summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  font-size: 1.05rem;
}
.faq-list summary::-webkit-details-marker {
  display: none;
}
.faq-list summary::after {
  content: "+";
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--kobalt-deep);
  transition: transform 0.3s var(--ease-out);
  flex-shrink: 0;
}
.faq-list details[open] summary::after {
  transform: rotate(45deg);
}
.faq-list .faq-body {
  padding: 0 1.5rem 1.4rem;
  color: var(--muted);
  max-width: 65ch;
}

/* ---------- Kontakt ---------- */
.contact {
  color: #fff;
  padding-bottom: 5rem;
}
.contact .section-title {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
}
.contact-channels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 3rem;
}
.channel {
  display: block;
  text-decoration: none;
  color: #fff;
  background: var(--nacht-soft);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 1.9rem 1.75rem;
  transition: transform 0.3s var(--ease-out), border-color 0.3s, box-shadow 0.3s;
  will-change: transform;
}
.channel:hover {
  transform: translateY(-4px);
  border-color: rgba(108, 140, 255, 0.5);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.channel.primary {
  background: var(--kobalt);
  border-color: transparent;
  box-shadow: 0 12px 36px rgba(43, 89, 255, 0.35);
  color: #fff;
}
.channel .ch-label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
}
.channel .ch-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-top: 0.5rem;
  word-break: break-word;
}
.channel .ch-hint {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.9rem;
  opacity: 0.75;
}
/* Mini-Formular: tertiärer Kanal, Blaupausen-Notation */
.contact-form {
  margin-top: 2.75rem;
  max-width: 560px;
  background: var(--nacht-soft);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: grid;
  gap: 1.35rem;
}
.contact-form .form-head {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-dark);
}
.contact-form .field {
  display: grid;
  gap: 0.45rem;
}
.contact-form label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-dark);
}
.contact-form input,
.contact-form textarea {
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0;
  padding: 0.55rem 0.1rem;
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.25s;
}
.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: none;
  border-bottom-color: var(--himmel);
  box-shadow: 0 1px 0 0 var(--himmel);
}
.contact-form textarea {
  min-height: 110px;
  resize: vertical;
}
.contact-form .btn {
  justify-self: start;
}
.contact-form .btn[disabled] {
  opacity: 0.6;
  pointer-events: none;
}
/* Honeypot: für Menschen unsichtbar */
.contact-form .hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.form-error {
  display: none;
  font-size: 0.92rem;
  color: #ffb3a6;
}
.contact-form.has-error .form-error {
  display: block;
}
.form-success {
  margin-top: 2.75rem;
  max-width: 560px;
  background: var(--nacht-soft);
  border: 1px solid rgba(108, 140, 255, 0.35);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: grid;
  gap: 0.6rem;
}
.form-success .ok-mark {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--himmel);
}
.form-success p {
  color: #fff;
  font-size: 1.02rem;
}

.contact-note {
  margin-top: 2.5rem;
  color: var(--muted-dark);
  font-size: 0.95rem;
}
.contact-note strong {
  color: #fff;
}

/* ---------- Footer ---------- */
.site-footer {
  color: var(--muted-dark);
  border-top: 1px solid var(--line-dark);
  padding-block: 2rem;
  font-size: 0.9rem;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}
.site-footer nav {
  display: flex;
  gap: 1.5rem;
}
.site-footer a {
  color: var(--muted-dark);
  text-decoration: none;
}
.site-footer a:hover {
  color: #fff;
}

/* ---------- Mobile Sticky-CTA ---------- */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-ctabar);
  display: none;
  gap: 0.75rem;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: rgba(13, 27, 42, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line-dark);
  transform: translateY(105%);
  transition: transform 0.45s var(--ease-out);
}
.sticky-cta.visible {
  transform: translateY(0);
}
.sticky-cta .btn {
  flex: 1;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
}
@media (max-width: 860px) {
  .sticky-cta {
    display: flex;
  }
}

/* ---------- Unterseiten (Impressum/Datenschutz) ---------- */
.legal-page {
  background: var(--papier);
}
.legal-main {
  padding: 9rem 0 5rem;
  max-width: 760px;
}
.legal-main h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 2rem;
}
.legal-main h2 {
  font-size: 1.35rem;
  margin: 2.25rem 0 0.75rem;
}
.legal-main p,
.legal-main li {
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.legal-main ul {
  padding-left: 1.25rem;
}
.legal-main .placeholder {
  background: var(--kobalt-soft);
  color: var(--kobalt-deep);
  padding: 0.05rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
}
.back-link {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--kobalt-deep);
  font-weight: 600;
  text-decoration: none;
}

/* ---------- A11y & Reduced Motion ---------- */
:focus-visible {
  outline: 3px solid var(--kobalt);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.15s !important;
  }
  .line-mask > span {
    transform: none;
    animation: none;
  }
  .hero-fade-in,
  .reveal {
    opacity: 1;
    transform: none;
  }
  html.js .problem-grid .zettel {
    --rot: 0deg;
    --tx: 0;
    --ty: 0;
  }
  .scroll-hint {
    display: none;
  }
  html.js .werke-pin {
    height: auto !important;
  }
  html.js .werke-view {
    position: static;
    height: auto;
  }
  .werke-track {
    overflow-x: auto;
  }
}
