/* ── "So funktioniert's" — animierte Comic-Bildergeschichte ─────────────────
   Baut auf landing.css auf (Tokens inkl. --android und .halftone, nav,
   .hero/.doc-hero, .cta-primary, footer werden von dort übernommen) — hier
   nur die comic-spezifischen Regeln: Panel-Grid, Sprechblasen,
   Geräte-Illustrationen. ────────────────────────────────────────────────── */

.hero-scroll-hint {
  margin-top: 36px;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.hero-scroll-hint svg { animation: comic-bob 1.8s ease-in-out infinite; }
@keyframes comic-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

.comic-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px max(18px, 4vw) 120px;
}

.comic-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 28px;
}

.panel {
  position: relative;
  background: linear-gradient(160deg, var(--surface), var(--surface2));
  border: 3px solid var(--parchment);
  border-radius: 4px;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, .55);
  padding: 26px 24px 24px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(38px) rotate(var(--tilt, 0deg)) scale(.94);
  transition: opacity .6s cubic-bezier(.2, .7, .3, 1), transform .6s cubic-bezier(.2, .7, .3, 1);
}
.panel.is-visible {
  opacity: 1;
  transform: translateY(0) rotate(var(--tilt, 0deg)) scale(1);
}

.panel-a { grid-column: span 3; --tilt: -.6deg; }
.panel-b { grid-column: span 3; --tilt: .5deg; }
.panel-c { grid-column: span 6; --tilt: 0deg; padding: 34px 30px 30px; }
.panel-d { grid-column: span 3; --tilt: .4deg; }
.panel-e { grid-column: span 3; --tilt: -.5deg; }
.panel-f { grid-column: span 6; --tilt: 0deg; }

@media (max-width: 760px) {
  .comic-grid { grid-template-columns: 1fr; }
  .panel-a, .panel-b, .panel-c, .panel-d, .panel-e, .panel-f, .panel-g { grid-column: span 1; }
}

.panel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--bronze);
  margin-bottom: 10px;
}
.panel-kicker::before { content: ''; width: 16px; height: 2px; background: var(--bronze); display: inline-block; }

.panel-caption {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.28;
  text-wrap: balance;
  color: var(--parchment);
  margin-top: 18px;
}
.panel-c .panel-caption { font-size: clamp(1.5rem, 3vw, 2.1rem); max-width: 30ch; }

.panel-note {
  margin-top: 8px;
  font-size: .92rem;
  color: var(--muted);
  max-width: 40ch;
}

/* ── Sprechblase ─────────────────────────────────────────────────────────── */
.bubble {
  position: relative;
  background: var(--parchment);
  color: var(--ink);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: .92rem;
  font-weight: 600;
  max-width: 88%;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .4);
}
.bubble::after {
  content: '';
  position: absolute;
  left: 22px;
  bottom: -9px;
  width: 0;
  height: 0;
  border: 10px solid transparent;
  border-top-color: var(--parchment);
  border-bottom: 0;
}
.bubble .comic-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--ink);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: comic-blink 1s step-end infinite;
}
@keyframes comic-blink { 50% { opacity: 0; } }

/* ── Laptop-Illustration (Panel A) ───────────────────────────────────────── */
.laptop {
  margin-top: 22px;
  border: 2.5px solid var(--parchment);
  border-radius: 8px;
  background: var(--ink);
  padding: 10px;
}
.laptop-dots { display: flex; gap: 5px; margin-bottom: 8px; }
.laptop-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.laptop-base {
  height: 8px;
  margin-top: 10px;
  background: var(--parchment);
  border-radius: 0 0 6px 6px;
  opacity: .9;
}

/* ── Workflow-Kette (Panel B) ────────────────────────────────────────────── */
.chain { margin-top: 26px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chain-node {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2.5px solid var(--steel);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: var(--surface2);
  flex-shrink: 0;
}
.chain-arrow {
  flex: 1;
  min-width: 18px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--muted) 0 6px, transparent 6px 11px);
  position: relative;
}
.chain-arrow::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 50%;
  translate: 0 -50%;
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-left-color: var(--muted);
}

/* ── Drei-Geräte-Szene (Panel C, Herzstück) ──────────────────────────────── */
.devices {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 26px;
  align-items: end;
  position: relative;
}
@media (max-width: 640px) { .devices { grid-template-columns: 1fr; } }

.device { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.device-label {
  font-family: var(--mono);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}
.device-dot { width: 8px; height: 8px; border-radius: 50%; }

.device-shell {
  width: 100%;
  background: var(--ink);
  border-radius: 10px;
  padding: 8px;
  box-shadow: 0 0 0 3px var(--accent, var(--steel)) inset;
}
.device-shell.is-window { border-radius: 6px; }
.device-shell.is-phone { max-width: 150px; margin: 0 auto; border-radius: 20px; padding: 14px 8px; }

.device-chrome { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; }
.device-chrome span { width: 6px; height: 6px; border-radius: 50%; background: var(--border); }
.device-chrome .bar { flex: 1; height: 6px; background: var(--surface2); border-radius: 3px; margin-left: 6px; }
.device-shell.is-phone .device-chrome { justify-content: center; margin-bottom: 12px; }
.device-shell.is-phone .device-chrome .bar { flex: none; width: 30px; height: 4px; margin-left: 0; }

.mini-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
}
.mini-card .mini-title { height: 6px; width: 62%; background: var(--muted); border-radius: 3px; margin-bottom: 8px; opacity: .8; }
.mini-steps { display: flex; gap: 5px; }
.mini-steps span {
  flex: 1;
  height: 16px;
  border-radius: 4px;
  background: var(--accent, var(--steel));
  opacity: .28;
}
.mini-steps span.is-active { opacity: 1; }

.device[data-p="web"] { --accent: var(--steel); }
.device[data-p="desktop"] { --accent: var(--bronze); }
.device[data-p="android"] { --accent: var(--android); }
.device-label[data-p="web"] { color: var(--steel); }
.device-label[data-p="desktop"] { color: var(--bronze); }
.device-label[data-p="android"] { color: var(--android); }
.device-dot[data-p="web"] { background: var(--steel); }
.device-dot[data-p="desktop"] { background: var(--bronze); }
.device-dot[data-p="android"] { background: var(--android); }

.sync-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 46%;
  height: 90px;
  pointer-events: none;
}
@media (max-width: 640px) { .sync-line { display: none; } }
.sync-line svg { width: 100%; height: 100%; overflow: visible; }
.sync-path {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke: url(#syncGradient);
  stroke-dasharray: 10 9;
  animation: comic-dash 1.6s linear infinite;
}
@keyframes comic-dash { to { stroke-dashoffset: -38; } }

.sfx {
  position: absolute;
  top: 8px;
  right: 18px;
  font-family: var(--sans);
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--steel);
  padding: 4px 12px;
  transform: rotate(4deg) skewX(-6deg);
  border-radius: 3px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .5);
}

/* ── Panel D: unterwegs freigeben ────────────────────────────────────────── */
.phone-standalone {
  margin-top: 22px;
  width: 108px;
  background: var(--ink);
  border-radius: 20px;
  box-shadow: 0 0 0 3px var(--android) inset;
  padding: 14px 8px;
}
.phone-standalone .device-chrome { justify-content: center; margin-bottom: 12px; }
.phone-standalone .device-chrome .bar { flex: none; width: 26px; height: 4px; margin-left: 0; }
.approve-row { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.approve-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(22, 163, 74, .16);
  color: var(--android);
  border: 1.5px solid var(--android);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 700;
}
.motion-lines { display: flex; gap: 4px; opacity: .6; }
.motion-lines span { width: 14px; height: 2px; background: var(--muted); border-radius: 2px; }
.motion-lines span:nth-child(2) { width: 10px; }
.motion-lines span:nth-child(3) { width: 6px; }

/* ── Panel E: Ergebnis überall ───────────────────────────────────────────── */
.result-burst { position: relative; margin-top: 24px; display: flex; justify-content: center; }
.burst-doc {
  position: relative;
  z-index: 2;
  width: 64px;
  height: 78px;
  background: var(--parchment);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 4px 4px 0 rgba(0, 0, 0, .5);
}
.burst-doc::before, .burst-doc::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  height: 3px;
  background: var(--border);
}
.burst-doc::before { top: 26px; }
.burst-doc::after { top: 38px; }
.burst-doc svg { color: var(--android); }
.burst-rays {
  position: absolute;
  inset: -30px;
  z-index: 1;
  background: repeating-conic-gradient(from 0deg, rgba(197, 148, 74, .35) 0deg 4deg, transparent 4deg 20deg);
  border-radius: 50%;
  animation: comic-spin 14s linear infinite;
}
@keyframes comic-spin { to { transform: rotate(360deg); } }
.echo-row { display: flex; justify-content: center; gap: 14px; margin-top: 20px; }
.echo-dot {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--accent);
  opacity: .85;
  font-size: .8rem;
  font-weight: 700;
}

/* ── Panel F: CTA ────────────────────────────────────────────────────────── */
.panel-f {
  background: linear-gradient(135deg, var(--surface2), var(--ink));
  text-align: center;
  padding: 52px 28px !important;
}
.panel-f-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  text-wrap: balance;
  color: var(--parchment);
}
.panel-f-title em { font-style: italic; color: var(--bronze); }
.platform-badges { margin-top: 18px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.platform-badge {
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  color: var(--muted);
}
.panel-f .cta-primary { margin-top: 28px; box-shadow: 5px 5px 0 rgba(0, 0, 0, .5); }
.panel-f .cta-primary:hover { box-shadow: 7px 7px 0 rgba(0, 0, 0, .5); transform: translate(-2px, -2px); }

/* ── Panel G: Live-Metrik-Diagramm (neu, siehe MetricsChartControl in der Anwendung) ─────────── */
.panel-g { grid-column: span 6; --tilt: -.3deg; }

.metric-chart-demo {
  margin-top: 22px;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(180deg, #161B26, #0A0D14);
  border: 2px solid rgba(255,255,255,.06);
  padding: 14px 16px 10px;
}

.metric-chart-live {
  position: absolute;
  top: 12px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8393A6;
}
.metric-chart-live::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5CFF9E;
  box-shadow: 0 0 6px #5CFF9E;
  animation: metric-pulse 1.6s ease-in-out infinite;
}
@keyframes metric-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.metric-chart-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .03em;
  color: #DCE6F2;
}
.metric-chip-dot { width: 9px; height: 9px; border-radius: 2px; background: var(--c); box-shadow: 0 0 6px var(--c); }

.metric-chart-svg { width: 100%; height: 108px; display: block; overflow: visible; }
.metric-chart-svg polyline { filter: drop-shadow(0 0 3px currentColor); }

.metric-chart-note { margin-top: 10px; font-size: .78rem; color: var(--muted); }
.metric-chart-note strong { color: var(--parchment); }

@media (prefers-reduced-motion: reduce) {
  .panel { transition: opacity .01s linear; transform: none !important; }
  .sync-path, .burst-rays, .hero-scroll-hint svg, .bubble .comic-cursor, .metric-chart-live::before { animation: none !important; }
}
