/* ============================================================
   Pluvidex Landingpage — Styles
   Regeln aus dem Design-System: flache Flächen (keine Gradients,
   kein Glas), warme Schatten, darken-on-hover, sentence case,
   ruhige funktionale Animation.
   ============================================================ */

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

h1, h2, h3 { font-family: var(--font-display); margin: 0; text-wrap: pretty; }

h1 {
  font-size: clamp(34px, 4.6vw, var(--text-5xl));
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
}

h2 {
  font-size: clamp(28px, 3.4vw, var(--text-4xl));
  font-weight: var(--weight-semibold);
  line-height: 1.15;
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-4);
}

h3 { font-size: var(--text-lg); font-weight: var(--weight-semibold); line-height: var(--leading-snug); }

p { margin: 0; }

a { color: var(--text-link); text-decoration: none; }
a:hover { color: var(--text-link-hover); }

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: clamp(20px, 5vw, 40px);
  padding-right: clamp(20px, 5vw, 40px);
}

.container-narrow { max-width: 860px; }

.section { padding: clamp(64px, 9vw, 112px) 0; }

.section-lead {
  max-width: 640px;
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
  margin-bottom: var(--space-10);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-brand);
  margin-bottom: var(--space-3);
}

.eyebrow-gold { color: var(--wheat-300); }
.eyebrow-sm { margin-bottom: 0; font-size: 11px; color: var(--text-tertiary); }

.icon { width: 16px; height: 16px; flex: 0 0 auto; }
.icon-lg { width: 22px; height: 22px; }

/* Fokus-Ring nach Styleguide */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--surface-card);
  color: var(--text-brand);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}
.skip-link:focus { left: var(--space-3); top: var(--space-3); }

/* Anker landen unterhalb des Sticky-Headers */
#problem, #funktionsweise, #vorteile, #pilot, #faq, #start { scroll-margin-top: 72px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: var(--weight-medium);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background var(--duration-fast) var(--ease-standard),
              border-color var(--duration-fast) var(--ease-standard),
              transform var(--duration-fast) var(--ease-standard);
}
.btn:active { transform: translateY(1px); }

.btn-md { padding: 9px 16px; font-size: var(--text-sm); }
.btn-lg { padding: 12px 20px; font-size: var(--text-md); }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--brand-primary);
  color: var(--text-inverse);
  border-color: var(--brand-primary);
}
.btn-primary:hover { background: var(--brand-primary-hover); border-color: var(--brand-primary-hover); color: var(--text-inverse); }
.btn-primary:active { background: var(--brand-primary-active); }

.btn-secondary {
  background: var(--surface-card);
  color: var(--text-brand);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--surface-sunken); color: var(--text-brand); }

/* Helle Buttons für dunkle (Inverse-)Flächen */
.btn-light {
  background: var(--sand-50);
  color: var(--forest-900);
  border-color: var(--sand-50);
}
.btn-light:hover { background: var(--sand-100); border-color: var(--sand-100); color: var(--forest-900); }

.btn-outline-light {
  background: transparent;
  color: var(--sand-50);
  border-color: rgba(248, 246, 240, 0.4);
}
.btn-outline-light:hover { background: rgba(248, 246, 240, 0.08); border-color: rgba(248, 246, 240, 0.6); color: var(--white); }

/* ---------- Header / Reiter ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface-card);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  height: 64px;
}

.brand { display: inline-flex; align-items: center; }
.brand img { height: 34px; width: auto; display: block; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  display: inline-block;
  position: relative;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color var(--duration-fast) var(--ease-standard),
              background var(--duration-fast) var(--ease-standard);
}
.nav-link:hover { color: var(--text-brand); background: var(--surface-sunken); }

/* Aktiver Reiter: Wheat-Gold-Unterstreichung */
.nav-link.is-active { color: var(--text-brand); }
.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: var(--space-3);
  right: var(--space-3);
  bottom: 2px;
  height: 2px;
  border-radius: var(--radius-pill);
  background: var(--accent-wheat);
}

.nav-cta-item { margin-left: var(--space-2); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: var(--space-2);
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  cursor: pointer;
}
.nav-toggle:hover { background: var(--surface-sunken); }

.nav-toggle-box { position: relative; width: 16px; height: 12px; display: inline-block; }
.nav-toggle-bar,
.nav-toggle-box::before,
.nav-toggle-box::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  transition: transform var(--duration-base) var(--ease-standard), opacity var(--duration-base) var(--ease-standard);
}
.nav-toggle-box::before { top: 0; }
.nav-toggle-bar { top: 5.25px; }
.nav-toggle-box::after { bottom: 0; }

.site-header.nav-open .nav-toggle-box::before { transform: translateY(5.25px) rotate(45deg); }
.site-header.nav-open .nav-toggle-bar { opacity: 0; }
.site-header.nav-open .nav-toggle-box::after { transform: translateY(-5.25px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-1);
    background: var(--surface-card);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
    padding: var(--space-3) clamp(20px, 5vw, 40px) var(--space-4);
  }
  .site-header.nav-open .nav-menu { display: flex; }
  .nav-link { display: block; padding: var(--space-3); }
  .nav-link.is-active::after { left: var(--space-3); right: auto; width: 28px; }
  .nav-cta-item { margin: var(--space-2) 0 0; }
  .nav-cta-item .btn { width: 100%; }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--surface-inverse);
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  min-height: calc(100vh - 64px);
  padding: clamp(56px, 8vw, 96px) 0;
}

.hero-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(40px, 6vw, 88px);
  width: 100%;
}

.hero-copy { flex: 1 1 480px; max-width: 640px; }

.hero h1 { color: var(--white); margin-bottom: var(--space-5); }

.hero-lead {
  font-size: clamp(16px, 1.4vw, var(--text-lg));
  line-height: var(--leading-relaxed);
  color: var(--sand-200);
  max-width: 560px;
  margin-bottom: var(--space-8);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.hero-datapoints {
  font-size: var(--text-2xs);
  letter-spacing: 0.04em;
  color: var(--sand-500);
}

.hero-card-wrap { flex: 1 1 320px; max-width: 420px; }

/* Feldstatus-Karte (Stil: RiskIndexGauge / FieldStatusRow aus dem Design-System) */
.field-card {
  background: var(--surface-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-6);
}

.field-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}
.badge-success { background: var(--status-success-bg); color: var(--status-success); }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.field-card-id {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-4);
}

.gauge-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-2);
}
.gauge-label { font-size: var(--text-xs); font-weight: var(--weight-medium); color: var(--text-secondary); }
.gauge-value { font-size: var(--text-xl); font-weight: var(--weight-medium); color: var(--text-primary); }
.gauge-max { font-size: var(--text-sm); color: var(--text-tertiary); }

.gauge-bar {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--sand-100);
  overflow: hidden;
}
.gauge-fill {
  width: 0;
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--status-warning);
  transition: width 1.4s var(--ease-standard);
}

.gauge-note {
  margin-top: var(--space-2);
  font-size: var(--text-2xs);
  color: var(--text-tertiary);
}

.field-card-rows { margin-top: var(--space-5); border-top: 1px solid var(--border-subtle); }

.field-rows-label { padding-top: var(--space-4); margin-bottom: calc(-1 * var(--space-1)); }

.field-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--text-xs);
  color: var(--text-secondary);
}
.field-row:last-child { border-bottom: none; padding-bottom: 0; }
.field-row .mono { color: var(--text-primary); font-size: var(--text-xs); }

.hero-card-caption {
  margin-top: var(--space-3);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--sand-500);
  text-align: right;
}

/* ---------- Karten & Grids ---------- */
.card-grid { display: grid; gap: var(--space-5); }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 900px) {
  .card-grid-3, .card-grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  padding: var(--space-6);
}

.card h3 { margin-bottom: var(--space-2); }
.card p { font-size: var(--text-sm); line-height: var(--leading-relaxed); color: var(--text-secondary); }

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--forest-100);
  color: var(--text-brand);
  margin-bottom: var(--space-4);
}

/* ---------- Vergleichstabelle ---------- */
.compare-card {
  margin-top: var(--space-12);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  padding: var(--space-6);
}

.compare-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-4);
}

.table-scroll { overflow-x: auto; }

.compare-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.compare-table th, .compare-table td {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}
.compare-table tbody tr:last-child th, .compare-table tbody tr:last-child td { border-bottom: none; }

.compare-table thead th {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.compare-table tbody th { font-weight: var(--weight-medium); color: var(--text-primary); white-space: nowrap; }
.compare-table td { color: var(--text-secondary); }
.compare-table td:last-child { color: var(--text-brand); font-weight: var(--weight-medium); }

/* ---------- Sektionen: Hintergrund-Rhythmus ---------- */
.section-problem { background: var(--surface-page); }
.section-how-intro { background: var(--white); }
.section-benefits { background: var(--surface-page); }
.section-faq { background: var(--white); }

/* ---------- Pilotprogramm ---------- */
.section-pilot {
  background: var(--surface-inverse);
  color: var(--text-inverse);
}

.section-pilot h2 { color: var(--white); }

.pilot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(40px, 6vw, 88px);
  align-items: flex-start;
}

.pilot-copy { flex: 1 1 440px; max-width: 600px; }

.pilot-lead {
  font-size: var(--text-md);
  line-height: var(--leading-relaxed);
  color: var(--sand-200);
  margin-bottom: var(--space-8);
}

.pilot-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.pilot-steps li { display: flex; gap: var(--space-4); align-items: flex-start; }

.step-num {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--forest-600);
  border-radius: var(--radius-sm);
  color: var(--wheat-300);
  font-size: var(--text-xs);
  background: rgba(38, 81, 47, 0.35);
}

.pilot-steps strong { color: var(--white); font-weight: var(--weight-semibold); }
.pilot-steps div { font-size: var(--text-sm); line-height: var(--leading-relaxed); color: var(--sand-300); }

/* Formular */
.pilot-form {
  flex: 1 1 340px;
  max-width: 460px;
  background: var(--surface-card);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-6);
}

.pilot-form-head { margin-bottom: var(--space-5); }
.pilot-form-head h3 { font-size: var(--text-xl); margin-top: var(--space-1); }

.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--space-4); }

.form-field label {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
}
.req { color: var(--status-danger); }

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 9px 12px;
  font-size: var(--text-sm);
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  outline: none;
  transition: box-shadow var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard);
}
.form-field textarea { resize: vertical; min-height: 96px; }

.form-field input::placeholder, .form-field textarea::placeholder { color: var(--text-tertiary); }

.form-field input:focus, .form-field textarea:focus {
  border-color: var(--border-brand);
  box-shadow: var(--shadow-focus);
}

.form-field input.field-invalid, .form-field textarea.field-invalid { border-color: var(--status-danger); }

/* Honeypot: unsichtbar für Menschen */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  margin-top: var(--space-3);
  font-size: var(--text-2xs);
  line-height: var(--leading-normal);
  color: var(--text-tertiary);
}

.form-fallback {
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
  color: var(--text-secondary);
  background: var(--status-success-bg);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
}

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-8); }

.faq-item {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  list-style: none;
  cursor: pointer;
  padding: var(--space-4) var(--space-5);
  font-weight: var(--weight-medium);
  font-size: var(--text-md);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--text-brand); }

.faq-chevron { color: var(--text-tertiary); transition: transform var(--duration-base) var(--ease-standard); }
.faq-item[open] .faq-chevron { transform: rotate(180deg); }

.faq-item p {
  padding: 0 var(--space-5) var(--space-5);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
  max-width: 720px;
}

.faq-cta {
  margin-top: var(--space-10);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.faq-cta p { color: var(--text-secondary); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--forest-950);
  color: var(--sand-300);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(32px, 5vw, 72px);
  padding-top: var(--space-16);
  padding-bottom: var(--space-10);
}

.footer-brand { flex: 2 1 300px; max-width: 420px; }
.footer-brand img { height: 34px; width: auto; }

.footer-tagline {
  margin-top: var(--space-3);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--sand-500);
}

.footer-desc { margin-top: var(--space-4); font-size: var(--text-sm); line-height: var(--leading-relaxed); }

.footer-nav, .footer-contact { flex: 1 1 180px; }

.footer-head {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--sand-500);
  margin-bottom: var(--space-4);
}

.footer-nav ul, .footer-legal { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.footer-nav a, .footer-legal a { color: var(--sand-300); font-size: var(--text-sm); }
.footer-nav a:hover, .footer-legal a:hover { color: var(--sand-50); }

.footer-mail {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--wheat-300);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  margin-bottom: var(--space-5);
}
.footer-mail:hover { color: var(--wheat-100); }

.footer-bottom {
  border-top: 1px solid rgba(248, 246, 240, 0.12);
  padding-top: var(--space-5);
  padding-bottom: var(--space-8);
  font-size: var(--text-2xs);
  color: var(--sand-500);
}

/* ============================================================
   EXPLAINER — 4 Phasen (Port aus „Pluvidex Explainer.html")
   Markup, Farben, Keyframes und Delays 1:1 übernommen; statt
   React-State steuert die Klasse .is-active (IntersectionObserver
   in js/main.js) die Animationen. Entfernen der Klasse setzt auf
   den Ausgangszustand zurück → Animationen replayen beim
   Wiedereintritt wie im Original.
   ============================================================ */

.explainer { position: relative; color: #F8F6F0; }

.xp {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(48px, 8vh, 96px) clamp(20px, 6vw, 88px);
  position: relative;
}

.xp-visual { flex: 1 1 480px; max-width: 760px; min-width: min(100%, 300px); }
.xp[data-phase="0"] .xp-visual { max-width: 740px; }

.xp-caption { flex: 1 1 300px; max-width: 440px; }

.xp-kicker {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  margin-bottom: 14px;
}

.xp-h {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.12;
  margin: 0 0 18px;
}

.xp-p {
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.65;
  margin: 0 0 20px;
}

.xp-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #7A755F;
  letter-spacing: 0.04em;
}

/* Phase 2 — Layout & Chips */
.xp-visual-row {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  flex-wrap: wrap;
}

.xp-inputs { display: flex; flex-direction: column; gap: 14px; flex: 0 1 auto; }

.xp-chip {
  border: 1px solid #3D7A4C;
  border-radius: 6px;
  padding: 9px 13px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: #E3EDE4;
  background: rgba(38, 81, 47, 0.35);
  white-space: nowrap;
}
.xp-chip-sub { color: #B5AF9B; font-size: 11px; }

.xp-net { flex: 1 1 280px; min-width: 260px; }

.xp-model-card {
  border: 1px solid #3D7A4C;
  border-radius: 10px;
  background: #1D4229;
  padding: 18px 20px;
  max-width: 250px;
}
.xp-model-kicker { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; color: #B5AF9B; margin-bottom: 12px; }
.xp-model-title { font-size: 14px; font-weight: 600; color: #FFFFFF; margin-bottom: 6px; }
.xp-model-divider { border-top: 1px solid rgba(61, 122, 76, 0.5); padding-top: 12px; }
.xp-model-sub { font-size: 13px; color: #D9D3C4; margin-bottom: 4px; }
.xp-model-value { font-family: var(--font-mono); font-size: 15px; color: #E4C866; }
.xp-model-badge {
  margin-top: 14px;
  display: inline-block;
  background: #C9A227;
  color: #15301F;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border-radius: 999px;
}

/* Phase 3 — Chips & Chart-Karte */
.xp-chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }

.xp-pill {
  border: 1px solid #D9D3C4;
  border-radius: 999px;
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #605A48;
  background: #FFFFFF;
}

.xp-chart-card {
  background: #FFFFFF;
  border: 1px solid #D9D3C4;
  border-radius: 10px;
  padding: clamp(14px, 2vw, 24px);
}

/* Scroll-Hinweis (Phase 1) */
.xp-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26px;
  display: flex;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.xp[data-phase="0"].is-active .xp-hint { opacity: 1; }

.xp-hint-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.xp-hint-inner span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: #B5AF9B;
}

/* Rail (Phasen-Punktnavigation) */
.xp-rail {
  position: fixed;
  right: clamp(10px, 2vw, 26px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-end;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.xp-rail.is-visible { opacity: 1; pointer-events: auto; }

.xp-rail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 2px;
}

.xp-rail-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: #B5AF9B;
  opacity: 0;
  transition: opacity 0.25s ease;
  white-space: nowrap;
}

.xp-rail-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid #B5AF9B;
  background: transparent;
  transition: all 0.25s ease;
}

.xp-rail-item.is-active .xp-rail-label { opacity: 1; color: #C9A227; }
.xp-rail-item.is-active .xp-rail-dot { border-color: #C9A227; background: #C9A227; }

/* Auf heller Phase (3) neutralere Ruhefarbe */
.xp-rail.on-light .xp-rail-label { color: #7A755F; }
.xp-rail.on-light .xp-rail-dot { border-color: #7A755F; }
.xp-rail.on-light .xp-rail-item.is-active .xp-rail-label { color: #C9A227; }
.xp-rail.on-light .xp-rail-item.is-active .xp-rail-dot { border-color: #C9A227; background: #C9A227; }

/* ---------- Keyframes (1:1 aus dem Explainer) ---------- */
@keyframes satX { from { transform: translateX(-180px); } to { transform: translateX(840px); } }
@keyframes dashFlow { to { stroke-dashoffset: -28; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes drawPath { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes barSweep { from { transform: translateX(0); } to { transform: translateX(676px); } }
@keyframes netIn { from { opacity: 0; transform: scale(0.72); } to { opacity: 1; transform: scale(1); } }
@keyframes ringPulse { 0% { transform: scale(0.15); opacity: 0.9; } 100% { transform: scale(1); opacity: 0; } }
@keyframes coinGo { 0% { transform: translate(0px, 0px); opacity: 0; } 14% { opacity: 1; } 100% { transform: translate(318px, -32px); opacity: 1; } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }
@keyframes softPulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }

/* Endlos-Loops laufen nur in der aktiven Phase (Original lief dauerhaft;
   pausiert spart CPU, sobald die Phase aus dem Bild ist) */
.loop-sat { animation: satX 11s linear infinite; animation-play-state: paused; }
.loop-pulse { animation: softPulse 2.6s ease-in-out infinite; animation-play-state: paused; }
.loop-float { animation: floatY 1.8s ease-in-out infinite; animation-play-state: paused; }
.loop-dash { animation: dashFlow 1.2s linear infinite; animation-play-state: paused; }
.xp.is-active .loop-sat,
.xp.is-active .loop-pulse,
.xp.is-active .loop-float,
.xp.is-active .loop-dash { animation-play-state: running; }

/* ---------- Animationszustände je Phase (Delays wie im Original) ---------- */

/* Ruhezustand: verborgen */
.a-p1cap, .a-p2cap, .a-p2l1, .a-p2l2, .a-p2l3, .a-p2l4, .a-p2l5, .a-p2out,
.a-p3cap, .a-p3chips, .a-p4cap, .a-p4dot, .a-p4coin, .a-p4pay { opacity: 0; }

.a-p2net { opacity: 0; transform: scale(0.72); transform-origin: center; }
.a-p4pulse, .a-p4pulse2 { opacity: 0; }
.a-p3curve, .a-p4curve { stroke-dasharray: 1; stroke-dashoffset: 1; }
.a-p3cover { transform: translateX(0); }

/* Phase 1 */
.xp.is-active .a-p1cap { animation: fadeUp 0.8s 0.15s ease-out both; }

/* Phase 2 (fünf Datenströme, enger gestaffelt) */
.xp.is-active .a-p2cap { animation: fadeUp 0.8s 0.15s ease-out both; }
.xp.is-active .a-p2l1 { animation: fadeUp 0.6s 0.2s ease-out both; }
.xp.is-active .a-p2l2 { animation: fadeUp 0.6s 0.35s ease-out both; }
.xp.is-active .a-p2l3 { animation: fadeUp 0.6s 0.5s ease-out both; }
.xp.is-active .a-p2l4 { animation: fadeUp 0.6s 0.65s ease-out both; }
.xp.is-active .a-p2l5 { animation: fadeUp 0.6s 0.8s ease-out both; }
.xp.is-active .a-p2net { animation: netIn 1.1s 0.95s ease-out both; }
.xp.is-active .a-p2out { animation: fadeUp 0.8s 1.75s ease-out both; }

/* Phase 3 */
.xp.is-active .a-p3cap { animation: fadeUp 0.8s 0.15s ease-out both; }
.xp.is-active .a-p3chips { animation: fadeUp 0.6s 0.3s ease-out both; }
.xp.is-active .a-p3curve { animation: drawPath 3.6s 0.5s ease-out both; }
.xp.is-active .a-p3cover { animation: barSweep 3.6s 0.5s ease-out both; }

/* Phase 4 */
.xp.is-active .a-p4cap { animation: fadeUp 0.8s 0.15s ease-out both; }
.xp.is-active .a-p4curve { animation: drawPath 1.8s 0.3s ease-out both; }
.xp.is-active .a-p4dot { animation: fadeIn 0.3s 1.4s ease both; }
.xp.is-active .a-p4pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: ringPulse 1.8s 1.5s ease-out infinite;
}
.xp.is-active .a-p4pulse2 {
  transform-box: fill-box;
  transform-origin: center;
  animation: ringPulse 1.8s 2.4s ease-out infinite;
}
.xp.is-active .a-p4coin { animation: coinGo 1.5s 1.9s cubic-bezier(0.4, 0, 0.2, 1) both; }
.xp.is-active .a-p4pay { animation: fadeUp 0.7s 3.2s ease-out both; }

/* ---------- Reduzierte Bewegung: Endzustände statt Animation ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }

  .a-p1cap, .a-p2cap, .a-p2l1, .a-p2l2, .a-p2l3, .a-p2l4, .a-p2l5, .a-p2out,
  .a-p3cap, .a-p3chips, .a-p4cap, .a-p4dot, .a-p4coin, .a-p4pay { opacity: 1; }

  .a-p2net { opacity: 1; transform: none; }
  .a-p3curve, .a-p4curve { stroke-dasharray: none; stroke-dashoffset: 0; }
  .a-p3cover { display: none; }
  .a-p4coin { transform: translate(318px, -32px); }
  .a-p4pulse, .a-p4pulse2 { opacity: 0; }
  .xp-hint { display: none; }
}

/* ---------- Rechtstext-Seiten (Impressum, Datenschutz) ---------- */
.legal { padding: clamp(48px, 8vw, 96px) 0 clamp(56px, 8vw, 104px); background: var(--surface-page); }
.legal .container { max-width: 760px; }

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
}
.legal-back:hover { color: var(--text-brand); }

.legal h1 {
  font-size: clamp(30px, 4vw, var(--text-4xl));
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-6);
}
.legal h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  margin: var(--space-12) 0 var(--space-4);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}
.legal h3 {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin: var(--space-8) 0 var(--space-2);
}
.legal h4 {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  margin: var(--space-5) 0 var(--space-2);
}
.legal p {
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
  max-width: 72ch;
}
.legal ul {
  margin: 0 0 var(--space-4);
  padding-left: var(--space-5);
  max-width: 72ch;
}
.legal li {
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-1);
}
.legal .legal-emphasis {
  font-size: var(--text-xs);
  letter-spacing: 0.01em;
  color: var(--text-tertiary);
}
.legal a { color: var(--text-link); }
.legal a:hover { color: var(--text-link-hover); }

.legal-note {
  background: var(--status-info-bg);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-8);
}
