/* =========================================================
   My Cortex – Marketing-Seite
   Ruhig, konkret, handwerklich-seriös. Brand-Blau/Cyan als
   Committed-Fläche nur in Hero/CTA (Liquid), sonst restrained.
   Typo: IBM Plex Serif (Headlines) + IBM Plex Sans (Text).
   Tokens identisch zur bisherigen Seite (Identitätserhalt).
   ========================================================= */

/* ---------- Tokens: Light (Standard) ---------- */
:root {
  --brand-blue: #4a90d9;
  --brand-cyan: #29c5e6;

  --bg: #f7f9fb;
  --surface: #ffffff;
  --surface-2: #eef3f8;
  --ink: #16212c;
  --ink-soft: #43566a;
  --muted: #647688;
  --border: #e2e9f0;

  --accent: #2f6fb3;
  --accent-strong: #255c98;
  --accent-contrast: #ffffff;
  --ring: rgba(47, 111, 179, 0.35);

  --container: 1120px;
  --radius: 14px;

  /* Typo-Skala (modular ≥1.25): 13 → 17 → 22 → 34 → Display */
  --step--1: 0.8125rem;
  --step-0: 1.0625rem;
  --step-1: 1.375rem;
  --step-3: clamp(1.75rem, 1.2rem + 1.8vw, 2.125rem);
  --step-display: clamp(2.6rem, 1.4rem + 4vw, 4rem);

  --serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;

  --shadow-sm: 0 1px 2px rgba(16, 33, 48, 0.06);
  --shadow-md: 0 10px 30px rgba(16, 33, 48, 0.08);

  /* Bewegungs-System: eine Kurve, wenige Dauern */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);   /* ease-out-quint-artig */
  --t-fast: 180ms;
  --t-med: 480ms;

  /* Semantische z-Skala */
  --z-nav: 40;
  --z-intro: 80;

  color-scheme: light;
}

/* ---------- Tokens: Dark ---------- */
:root[data-theme="dark"] {
  --bg: #0e1722;
  --surface: #14202e;
  --surface-2: #1b2938;
  --ink: #e8eef5;
  --ink-soft: #b3c2d2;
  --muted: #8497aa;
  --border: #243446;

  --accent: #6fb0e6;
  --accent-strong: #8cc3f0;
  --accent-contrast: #08121c;
  --ring: rgba(111, 176, 230, 0.4);

  --shadow-sm: none;
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);

  color-scheme: dark;
}

/* ---------- Grundlagen ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* hidden-Attribut muss zuverlässig ausblenden, auch wenn eine Klasse
   display setzt (sonst überdeckt z. B. das Intro unsichtbar die Seite). */
[hidden] { display: none !important; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
ul { list-style: none; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 4px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

h1, h2, h3 { font-family: var(--serif); line-height: 1.15; text-wrap: balance; }
p { text-wrap: pretty; }

.eyebrow {
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.section-title {
  font-size: var(--step-3);
  font-weight: 600;
  max-width: 24ch;
  margin-bottom: clamp(28px, 5vw, 48px);
}
.fineprint { font-size: var(--step--1); color: var(--muted); margin-top: 14px; }

/* Sektions-Rhythmus: großzügig, mit bewusster Variation */
section { padding: clamp(64px, 9vw, 120px) 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; padding: 12px 24px;
  border-radius: 11px; border: 1px solid transparent;
  font-family: var(--sans); font-size: var(--step-0); font-weight: 600;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-contrast); }
.btn-primary:hover { background: var(--accent-strong); color: var(--accent-contrast); }
.btn-onblue { background: #fff; color: var(--brand-blue); }
.btn-onblue:hover { background: rgba(255, 255, 255, 0.92); color: var(--accent-strong); }
.btn-ghost-onblue { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.btn-ghost-onblue:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, 0.12); }

/* =========================================================
   Liquid-Hintergrund (wiederverwendbare Markenfläche)
   ========================================================= */
.liquid-bg {
  position: absolute; inset: 0; z-index: 0; overflow: hidden;
  background: linear-gradient(135deg,
    var(--brand-cyan) 0%,
    color-mix(in srgb, var(--brand-cyan) 50%, var(--brand-blue)) 48%,
    var(--brand-blue) 100%);
}
.liquid-bg::before, .liquid-bg::after {
  content: ""; position: absolute; inset: -25%;
  pointer-events: none; will-change: transform; filter: blur(24px);
}
.liquid-bg::before {
  background: radial-gradient(40% 40% at 32% 30%, var(--brand-cyan) 0%, transparent 62%);
  opacity: 0.85; animation: liquid-a 22s ease-in-out infinite alternate;
}
.liquid-bg::after {
  background: radial-gradient(44% 44% at 72% 72%, var(--brand-blue) 0%, transparent 60%);
  opacity: 0.8; animation: liquid-b 30s ease-in-out infinite alternate;
}
@keyframes liquid-a {
  0% { transform: translate3d(-6%, -4%, 0) scale(1); }
  50% { transform: translate3d(6%, 5%, 0) scale(1.12); }
  100% { transform: translate3d(-3%, 8%, 0) scale(1.05); }
}
@keyframes liquid-b {
  0% { transform: translate3d(5%, 4%, 0) scale(1.08); }
  50% { transform: translate3d(-6%, -5%, 0) scale(1); }
  100% { transform: translate3d(4%, -7%, 0) scale(1.12); }
}

/* =========================================================
   INTRO: Brand-Reveal (einmal pro Session)
   ========================================================= */
.intro {
  position: fixed; inset: 0; z-index: var(--z-intro);
  display: grid; place-items: center;
  transition: opacity 0.55s var(--ease), visibility 0s 0.55s;
}
.intro.is-leaving { opacity: 0; visibility: hidden; }
.intro-inner {
  position: relative; z-index: 1; text-align: center; color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.intro-eyebrow {
  font-size: var(--step--1); font-weight: 600; letter-spacing: 0.14em;
  text-transform: lowercase; color: rgba(255, 255, 255, 0.75);
  opacity: 0; animation: intro-fade 0.5s 0.15s var(--ease) forwards;
}
.intro-mark {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(2.6rem, 8vw, 5rem); letter-spacing: -0.01em; line-height: 1;
  display: block; overflow: hidden;
}
.intro-mark { clip-path: inset(0 0 100% 0); animation: intro-mark 0.9s 0.35s var(--ease) forwards; }
.intro-line {
  width: 0; height: 2px; background: rgba(255, 255, 255, 0.7); border-radius: 2px;
  animation: intro-line 0.7s 1.05s var(--ease) forwards;
}
@keyframes intro-fade { to { opacity: 1; } }
@keyframes intro-mark { to { clip-path: inset(0 0 -8% 0); } }
@keyframes intro-line { to { width: 120px; } }

/* =========================================================
   1. Navigation (sticky)
   ========================================================= */
.nav {
  position: sticky; top: 0; z-index: var(--z-nav);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-fast) ease, box-shadow var(--t-fast) ease;
}
.nav.is-scrolled { border-color: var(--border); box-shadow: var(--shadow-sm); }
.nav-inner {
  max-width: var(--container); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 28px;
}
.nav-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.nav-logo { width: 34px; height: 34px; border-radius: 9px; }
.nav-name { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; white-space: nowrap; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-link { color: var(--ink-soft); font-weight: 500; font-size: 0.95rem; }
.nav-link:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.btn-nav { min-height: 42px; padding: 9px 18px; font-size: 0.95rem; }

.theme-toggle {
  width: 42px; height: 42px; display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--ink-soft); cursor: pointer;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

@media (max-width: 860px) {
  .nav-links { display: none; }   /* Sektionen sind auf Mobil linear scrollbar */
}

/* =========================================================
   2. Hero
   ========================================================= */
/* Dunkle Bühne (immer dunkel, unabhängig vom Theme) mit getiltetem,
   nach unten/rechts ausmaskiertem Screenshot unseres echten Dashboards. */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  /* Unten in die Body-Fläche ausblenden (funktioniert in Light wie Dark) */
  background: linear-gradient(to bottom, #0a1220 0%, #0a1220 84%, transparent 100%);
  color: #eaf1fb;
  padding: clamp(56px, 9vw, 104px) 0 clamp(48px, 7vw, 96px);
}
.hero-scrim {                                /* dezenter Blau-Glow (aus dem Original) */
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.7;
  background:
    radial-gradient(56% 46% at 50% -4%, rgba(74, 144, 217, 0.20) 0%, transparent 62%),
    radial-gradient(40% 38% at 84% 6%, rgba(41, 197, 230, 0.10) 0%, transparent 60%);
}
.hero-inner {
  position: relative; z-index: 2;
  max-width: 720px; margin: 0 auto; padding: 0 24px; text-align: center;
}
.hero-title {
  font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em;
  font-size: clamp(2.1rem, 1.25rem + 3.4vw, 3.6rem); line-height: 1.08;
  color: #f5f9fe; text-wrap: balance;
}
.hero-line { display: inline; }
.hero-subtitle {
  margin: 20px auto 0; max-width: 40rem;
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.2rem); line-height: 1.62;
  color: #aec2da; text-wrap: pretty;
}
.hero-actions { margin-top: 30px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Getiltetes Dashboard-Bild: perspective -> rotateX -> skewX, doppelte Maske */
.hero-stage {
  position: relative; z-index: 1;
  max-width: 1200px; margin: clamp(28px, 5vw, 60px) auto 0;
  -webkit-mask-image: linear-gradient(to bottom, #000 46%, transparent 92%);
          mask-image: linear-gradient(to bottom, #000 46%, transparent 92%);
}
.hero-persp {
  perspective: 1200px;
  -webkit-mask-image: linear-gradient(to right, #000 52%, transparent 100%);
          mask-image: linear-gradient(to right, #000 52%, transparent 100%);
  padding-left: clamp(24px, 6vw, 120px);
  margin-right: clamp(-40px, -8vw, -160px);
}
.hero-rotate { transform: rotateX(20deg); }
.hero-skew { position: relative; transform: skewX(0.36rad); }
.hero-shot {
  display: block; width: 100%;
  height: clamp(360px, 44vw, 600px);        /* nur der obere Ausschnitt */
  object-fit: cover; object-position: top center;
  border-radius: 12px; border: 1px solid rgba(120, 160, 210, 0.18);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55);
}
@media (max-width: 720px) {
  /* Auf schmalen Screens flacher tilten, damit nichts unleserlich kippt */
  .hero-rotate { transform: rotateX(12deg); }
  .hero-skew { transform: skewX(0.22rad); }
}

/* =========================================================
   3. Kennzahlen
   ========================================================= */
.metric-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.metric {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 26px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: var(--shadow-sm);
}
.metric-value {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(2rem, 1.4rem + 1.8vw, 2.6rem); color: var(--accent);
  line-height: 1;
}
.metric-label { color: var(--ink-soft); }

/* =========================================================
   6. Drei Säulen
   ========================================================= */
.pillars { background: var(--surface); border-block: 1px solid var(--border); }
.pillar-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(24px, 4vw, 48px);
}
.pillar-name {
  font-size: var(--step-1); font-weight: 600; margin-bottom: 14px;
  padding-bottom: 12px; border-bottom: 2px solid var(--accent);
  display: inline-block;
}
.pillar-name { display: block; }
.pillar-points { display: flex; flex-direction: column; gap: 10px; }
.pillar-points li {
  position: relative; padding-left: 22px; color: var(--ink-soft);
}
.pillar-points li::before {
  content: "+"; position: absolute; left: 0; top: 0;
  color: var(--accent); font-weight: 700;
}

/* =========================================================
   7. Ablauf
   ========================================================= */

/* Scroll-Video (bestehende Komponente, hier eingebettet) */
.scrollvid {
  --sv-p: 0;
  --sv-stage: #d6d6d6;                 /* an die Video-Hintergrundfarbe angeglichen */
  position: relative; height: 200vh; background: var(--sv-stage);
  margin: clamp(24px, 4vw, 48px) 0;
}
.scrollvid-sticky {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  background: var(--sv-stage);
}
.scrollvid-video {
  position: absolute; inset: 0; margin: auto;
  width: 82%; height: 82%;               /* etwas kleiner, zentriert */
  object-fit: contain; object-position: center;
  background: var(--sv-stage); pointer-events: none;
}
.scrollvid-cap {
  position: absolute; top: 7vh; left: 0; right: 0; z-index: 2;
  text-align: center; pointer-events: none; padding: 0 24px; color: #16212c;
}
.scrollvid-title {
  font-size: clamp(1.9rem, 1.1rem + 2.8vw, 3.1rem);
  font-weight: 600; letter-spacing: -0.01em; color: #16212c;
  text-wrap: balance;
}
@media (max-width: 720px) { .scrollvid { height: 180vh; } }

/* Vergleichszeilen */
.compare { margin-top: clamp(24px, 4vw, 40px); }
.compare-head, .compare-row {
  display: grid; grid-template-columns: minmax(150px, 1.2fr) 2fr 2fr;
  gap: 14px; align-items: center; padding: 10px 0;
}
.compare-head { border-bottom: 1px solid var(--border); }
.compare-col { font-size: var(--step--1); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.compare-col--after { color: var(--accent); }
.compare-row { border-bottom: 1px solid var(--border); }
.compare-task { font-weight: 500; color: var(--ink); }
.compare-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bar {
  height: 10px; border-radius: 999px; flex-shrink: 1;
  width: var(--w); min-width: 6px;
  transform-origin: left center;
}
.bar--before { background: color-mix(in srgb, var(--muted) 38%, transparent); }
.bar--after { background: var(--accent); }
/* Balken wachsen beim Herunterscrollen in die Sektion ein (eigener Trigger,
   gestaffelt pro Zeile). Dieses kurze, horizontale Einwachsen spielt bewusst
   immer – es ist der Kern der Aussage der Tabelle. Ohne JS sofort voll. */
html.js .compare .bar {
  transform: scaleX(0);
  transition: transform 0.85s var(--ease);
  transition-delay: calc(var(--bar-i, 0) * 0.09s);
}
html.js .compare.bars-in .bar { transform: scaleX(1); }
html:not(.js) .compare .bar { transform: scaleX(1); }
.bar-num { font-size: var(--step--1); color: var(--muted); white-space: nowrap; }
.bar-num--after { color: var(--accent); font-weight: 600; }

@media (max-width: 640px) {
  .compare-head { display: none; }
  .compare-row { grid-template-columns: 1fr; gap: 8px; padding: 14px 0; }
}

/* Eingangsquellen */
.sources {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: clamp(28px, 4vw, 44px);
}
.sources-label { color: var(--muted); font-size: 0.95rem; }
.sources-list { display: flex; gap: 10px; flex-wrap: wrap; }
.source-pill {
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 0.92rem; font-weight: 500; color: var(--ink-soft);
}

/* 4 Schritte */
.steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(20px, 3vw, 32px); margin-top: clamp(36px, 5vw, 56px);
  counter-reset: none;
}
.step { position: relative; padding-top: 18px; border-top: 2px solid var(--border); }
.step-num {
  font-family: var(--serif); font-weight: 700; font-size: 1.05rem;
  color: var(--accent); letter-spacing: 0.04em;
}
.step-name { font-size: var(--step-1); font-weight: 600; margin: 6px 0 8px; }
.step-text { color: var(--ink-soft); font-size: 0.98rem; }

/* =========================================================
   8. Warum wir
   ========================================================= */
.cloud {
  display: flex; gap: 12px 18px; flex-wrap: wrap; align-items: baseline;
  max-width: 720px; margin-bottom: clamp(28px, 4vw, 40px);
}
.cloud-word {
  font-family: var(--serif); font-weight: 600; color: var(--ink-soft);
}
.cloud-word:nth-child(3n + 1) { font-size: 1.5rem; color: var(--ink); }
.cloud-word:nth-child(3n + 2) { font-size: 1.15rem; }
.cloud-word:nth-child(3n) { font-size: 1rem; color: var(--accent); }

.badges { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: clamp(36px, 5vw, 56px); }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 15px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 0.92rem; font-weight: 500; color: var(--ink-soft);
}
.badge svg { width: 15px; height: 15px; color: var(--accent); flex-shrink: 0; }

.counter-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.counter {
  border-top: 2px solid var(--accent); padding-top: 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.counter-value {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(2.2rem, 1.6rem + 2vw, 3rem); line-height: 1; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.counter-label { color: var(--ink-soft); }

.props {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(22px, 3.5vw, 40px); margin-top: clamp(40px, 6vw, 64px);
}
.prop { display: flex; gap: 18px; align-items: flex-start; }
.prop-num {
  font-family: var(--serif); font-weight: 700; font-size: 1.5rem;
  color: var(--accent); line-height: 1.1; flex-shrink: 0;
}
.prop-name { font-size: var(--step-1); font-weight: 600; margin-bottom: 6px; }
.prop-text { color: var(--ink-soft); font-size: 0.98rem; }

/* =========================================================
   10. CTA-Band
   ========================================================= */
.ctaband {
  position: relative; overflow: hidden; text-align: center; color: #fff;
  padding: clamp(72px, 10vw, 120px) 24px;
}
.ctaband-inner { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; }
.ctaband-title {
  font-size: var(--step-3); font-weight: 700; color: #fff;
  text-shadow: 0 1px 20px rgba(4, 18, 40, 0.25); margin-bottom: 14px;
}
.ctaband-sub {
  color: rgba(255, 255, 255, 0.93); margin-bottom: 30px;
  text-shadow: 0 1px 14px rgba(4, 18, 40, 0.2);
}

/* =========================================================
   11. Footer
   ========================================================= */
.footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: clamp(24px, 4vw, 48px); padding-top: clamp(48px, 6vw, 72px);
  padding-bottom: clamp(32px, 5vw, 48px);
}
.footer-claim { color: var(--muted); margin: 12px 0 8px; font-size: 0.95rem; }
.footer-mail { font-size: 0.95rem; }
.footer-head {
  font-family: var(--sans); font-size: var(--step--1); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 14px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-col a { color: var(--ink-soft); font-size: 0.98rem; }
.footer-col a:hover { color: var(--accent); }
.footer-news-text { color: var(--muted); font-size: 0.92rem; margin-bottom: 14px; }
.footer-form { display: flex; gap: 8px; }
.footer-form input {
  flex: 1; min-width: 0; padding: 11px 14px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 0.95rem;
}
.footer-form input:focus { outline: 3px solid var(--ring); outline-offset: 1px; }
.footer-form .btn { min-height: 44px; padding: 9px 18px; font-size: 0.95rem; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding-top: 20px; padding-bottom: 28px;
  border-top: 1px solid var(--border);
  color: var(--muted); font-size: 0.9rem; flex-wrap: wrap;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   Scroll-Reveals
   Inhalte sind IMMER sichtbar; nur mit JS (html.js) und ohne
   Reduced Motion wird der Startzustand versetzt und beim
   Scroll-in aufgelöst. Fallback-Timer im JS löst zusätzlich.
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal {
    opacity: 0; transform: translateY(18px);
    transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease);
    transition-delay: calc(var(--rv-i, 0) * 90ms);
  }
  html.js .reveal.in { opacity: 1; transform: none; }
}

/* ---------- Reduced Motion: alles ruhig, alles sichtbar ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .liquid-bg::before, .liquid-bg::after { animation: none; }
  .intro-eyebrow, .intro-mark, .intro-line { animation: none; }
  .btn, .btn:hover { transform: none; transition: none; }
}

/* =========================================================
   Impressum / Rechtstext (eigene Seite /impressum)
   Ruhige Lesespalte; Marken-Verlauf nur in der Überschrift.
   Nutzt dieselben Tokens -> Light/Dark automatisch.
   ========================================================= */
.legal {
  padding: clamp(56px, 8vw, 104px) 0 clamp(64px, 10vw, 120px);
}
.legal-inner {
  max-width: 760px; margin: 0 auto; padding: 0 24px;
}
.legal-title {
  font-family: var(--serif); font-weight: 700; letter-spacing: -0.02em;
  font-size: var(--step-display); line-height: 1.04; margin-top: 6px;
  overflow-wrap: break-word; hyphens: auto;   /* lange Rechtstitel (AVV) sauber umbrechen */
  color: var(--accent);                       /* Fallback ohne background-clip */
  background: linear-gradient(115deg, var(--brand-blue) 0%, var(--brand-cyan) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.legal-lead {
  color: var(--muted); font-size: var(--step-1); margin-top: 12px; max-width: 46ch;
}
.legal address {
  font-style: normal; line-height: 1.75; font-size: 1.05rem; color: var(--ink);
  margin-top: clamp(28px, 5vw, 44px);
}
.legal address .legal-name { font-weight: 700; }
.legal h2 {
  font-family: var(--serif); font-weight: 600; font-size: 1.2rem; color: var(--ink);
  margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border);
}
.legal p { color: var(--ink-soft); margin-top: 8px; max-width: 62ch; }
.legal a:hover { color: var(--accent-strong); text-decoration: underline; }
.legal-stand {
  margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: var(--step--1);
}

/* Zusätzliche Rechtstext-Elemente (AVV): Zwischenüberschrift, Listen, Tabelle */
.legal h3 {
  font-family: var(--serif); font-weight: 600; font-size: 1.02rem;
  color: var(--ink); margin-top: 22px;
}
.legal ul {
  list-style: disc; margin: 10px 0 0; padding-left: 22px;
  color: var(--ink-soft); max-width: 62ch;
}
.legal li { margin-top: 6px; }
.legal li::marker { color: var(--muted); }
.legal strong { color: var(--ink); font-weight: 600; }
.legal-tablewrap { margin-top: 16px; overflow-x: auto; }
.legal-table {
  width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 560px;
}
.legal-table th, .legal-table td {
  text-align: left; vertical-align: top; padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.legal-table th {
  color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.legal-table td { color: var(--ink-soft); }

/* Hervorgehobener Hinweiskasten in Rechtstexten (z.B. Geltungsbereich einer
   Fassung, Drittlandhinweis). Neutral in der Grundform, "warnung" fuer
   Sachverhalte, die der Kunde bewusst zur Kenntnis nehmen muss. */
.legal-hinweis {
  margin-top: 22px; padding: 16px 18px; border-radius: 12px;
  border: 1px solid var(--border); border-left: 3px solid var(--brand-blue);
  background: color-mix(in srgb, var(--brand-blue) 6%, transparent);
}
.legal-hinweis p { margin-top: 6px; max-width: none; }
.legal-hinweis p:first-child { margin-top: 0; }
.legal-hinweis.warnung {
  border-left-color: #d97706;
  background: color-mix(in srgb, #d97706 8%, transparent);
}

/* Zurueckgenommener Zusatz innerhalb eines Rechtstexts (z.B. verbundene
   Gesellschaften in der Unterauftragsverarbeiter-Tabelle) */
.legal-mut { color: var(--muted); font-size: 0.92em; display: inline-block; margin-top: 4px; }

/* Umschalter zwischen den AVV-Fassungen */
.legal-fassungen {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px;
}
.legal-fassungen a, .legal-fassungen span {
  padding: 7px 13px; border-radius: 99px; font-size: var(--step--1);
  border: 1px solid var(--border); color: var(--muted); text-decoration: none;
}
.legal-fassungen a:hover { color: var(--ink); border-color: var(--brand-blue); text-decoration: none; }
.legal-fassungen .aktiv {
  background: linear-gradient(115deg, var(--brand-blue), var(--brand-cyan));
  color: #fff; border-color: transparent; font-weight: 600;
}
