/* =========================================================================
   POWERMIETER — Animated visuals
   A) Stromfluss-Loop (Energiehaus)   B) Prozess-Sequenz "Vom Aushang zum Vertrag"
   Calm, premium, loopable. No persistent opacity:0 (screenshot-safe).
   ========================================================================= */

/* ---------------------------------------------------------------- A) FLOW */
.pm-flow { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* Solar PV cells gently breathe */
@keyframes pm-pv-glow { 0%, 100% { fill-opacity: .45; } 50% { fill-opacity: .95; } }
.pm-pv { animation: pm-pv-glow 3.4s var(--ease) infinite; filter: drop-shadow(0 0 3px color-mix(in oklab, var(--accent-400) 60%, transparent)); }

/* Lit apartment windows */
@keyframes pm-win-glow { 0%, 100% { fill-opacity: .14; } 50% { fill-opacity: .5; } }
.pm-win { animation: pm-win-glow 4.2s var(--ease) infinite; }

@media (prefers-reduced-motion: reduce) {
  .pm-pv, .pm-win { animation: none; fill-opacity: .55; }
}

/* ------------------------------------------------------------ B) SEQUENCE */
.pm-seq { display: block; }

.pm-seq-stage {
  display: grid; grid-template-columns: 230px 1fr; gap: 30px; align-items: center;
  background: linear-gradient(165deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 30px 32px; min-height: 312px; overflow: hidden;
}
.pm-narrow .pm-seq-stage { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 22px; padding: 26px 20px; }

/* device area */
.pm-seq-device { display: grid; place-items: center; height: 256px; position: relative; }
.pm-seq-scene { animation: pm-seqin .5s var(--ease) both; will-change: transform, opacity; }
@keyframes pm-seqin { from { transform: translateY(12px) scale(.97); } to { transform: none; } }

.pm-seq-caption { min-width: 0; }
.pm-narrow .pm-seq-caption { max-width: 30em; }
.pm-seq-caption-in { animation: pm-seqin .5s var(--ease) both; }
.pm-seq-step { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.pm-seq-title { font-family: var(--font-display); font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; letter-spacing: -.02em; color: var(--text); margin: 10px 0 0; line-height: 1.12; }
.pm-seq-desc { font-size: 14.5px; line-height: 1.6; color: var(--text-2); margin: 10px 0 0; max-width: 34em; }

/* ---- phone mock ---- */
.pm-seq-phone {
  width: 152px; height: 256px; border-radius: 28px; background: #0A1322;
  border: 6px solid #1C2E48; box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.pm-seq-phone-notch { position: absolute; top: 9px; left: 50%; transform: translateX(-50%); width: 46px; height: 7px; border-radius: 99px; background: #2A3F5D; z-index: 4; }
.pm-seq-phone-scr { position: absolute; inset: 6px; border-radius: 22px; background: var(--surface); overflow: hidden; display: flex; flex-direction: column; gap: 8px; padding: 22px 13px 14px; }

/* scanning sweep */
.pm-seq-scanline { position: absolute; left: 10px; right: 10px; top: 18px; height: 30px; z-index: 3; border-radius: 8px;
  background: linear-gradient(180deg, transparent, color-mix(in oklab, var(--accent-400) 32%, transparent), transparent);
  box-shadow: 0 0 12px color-mix(in oklab, var(--accent-400) 55%, transparent);
  border-top: 1.5px solid var(--accent-400); border-bottom: 1.5px solid var(--accent-400);
  animation: pm-scan 2s var(--ease) infinite; }
@keyframes pm-scan { 0% { top: 22px; } 50% { top: 196px; } 100% { top: 22px; } }
@media (prefers-reduced-motion: reduce) { .pm-seq-scanline { animation: none; top: 110px; } }

/* ---- poster (Aushang) ---- */
.pm-seq-poster {
  width: 172px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-md); padding: 16px 15px 18px; text-align: center; transform: rotate(-2.5deg);
}
.pm-seq-poster::before { content: ''; position: absolute; }
.pm-seq-poster-top { display: flex; justify-content: center; padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.pm-seq-poster-h { font-family: var(--font-display); font-weight: 700; font-size: 14px; line-height: 1.2; color: var(--text); }
.pm-seq-qr { display: grid; place-items: center; margin: 13px 0 11px; }
.pm-seq-poster-sub { font-size: 11px; color: var(--text-3); font-weight: 600; }
/* pin */
.pm-seq-poster { position: relative; }
.pm-seq-pin { position: absolute; top: -7px; left: 50%; transform: translateX(-50%); width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 2px 5px #0006, inset 0 1px 1px #ffffff66; }

/* scene 2: phone over poster */
.pm-seq-scan-wrap { position: relative; width: 210px; height: 256px; }
.pm-seq-scan-wrap .pm-seq-poster { position: absolute; left: 0; top: 40px; width: 132px; transform: rotate(-5deg); opacity: .9; }
.pm-seq-scan-wrap .pm-seq-phone { position: absolute; right: 0; top: 0; }
.pm-seq-cam { height: 100%; display: grid; place-items: center; background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 7px, var(--surface-3) 7px, var(--surface-3) 14px); border-radius: 12px; }

/* ---- generic screen content blocks ---- */
.pm-seq-statusbar { height: 5px; width: 38px; border-radius: 99px; background: var(--surface-3); align-self: center; flex: none; }
.pm-seq-l { height: 8px; border-radius: 99px; background: var(--surface-3); flex: none; }
.pm-seq-l.w90 { width: 90%; } .pm-seq-l.w70 { width: 70%; } .pm-seq-l.w50 { width: 50%; }
.pm-seq-hero { height: 42px; border-radius: 9px; background: linear-gradient(150deg, var(--navy-700), var(--navy-900)); position: relative; overflow: hidden; flex: none; }
.pm-seq-hero::after { content: ''; position: absolute; right: -10px; top: -16px; width: 60px; height: 60px; border-radius: 50%; background: radial-gradient(circle, color-mix(in oklab, var(--accent-400) 70%, transparent), transparent 70%); }
.pm-seq-cta { margin-top: auto; height: 26px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 9.5px; font-weight: 700; display: grid; place-items: center; flex: none; }

/* form rows */
.pm-seq-input { height: 22px; border-radius: 6px; background: var(--surface-2); border: 1.5px solid var(--border); flex: none; }
.pm-seq-input[data-focus='true'] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 18%, transparent); background: var(--surface); }
.pm-seq-caret { width: 1.5px; height: 11px; background: var(--accent); display: inline-block; margin: 5px 0 0 8px; animation: pm-caret 1s steps(1) infinite; }
@keyframes pm-caret { 50% { opacity: 0; } }

/* contract check */
.pm-seq-doc { display: flex; flex-direction: column; gap: 7px; }
.pm-seq-checkbadge { width: 46px; height: 46px; border-radius: 50%; margin: 6px auto 2px; display: grid; place-items: center;
  background: var(--positive-tint); color: var(--positive); border: 2px solid color-mix(in oklab, var(--positive) 38%, transparent);
  box-shadow: 0 0 0 7px color-mix(in oklab, var(--positive) 9%, transparent); animation: pm-pop .55s var(--ease) both; }
.pm-seq-done-t { text-align: center; font-size: 10.5px; font-weight: 700; color: var(--positive); }

/* portal mini */
.pm-seq-portal-top { display: flex; align-items: center; justify-content: space-between; }
.pm-seq-pill { font-size: 8.5px; font-weight: 700; padding: 3px 7px; border-radius: 99px; background: var(--positive-tint); color: var(--positive); display: inline-flex; gap: 3px; align-items: center; }
.pm-seq-pill::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--positive); }
.pm-seq-big { font-family: var(--font-display); font-weight: 800; font-size: 28px; letter-spacing: -.02em; color: var(--text); line-height: 1; }
.pm-seq-big span { font-size: 14px; color: var(--accent); }
.pm-seq-bars { display: flex; align-items: flex-end; gap: 5px; height: 56px; margin-top: auto; }
.pm-seq-bars i { flex: 1; border-radius: 3px 3px 1px 1px; background: linear-gradient(180deg, var(--accent-400), color-mix(in oklab, var(--accent-400) 28%, transparent)); transform-origin: bottom; animation: pm-bar-rise .7s var(--ease) both; }
@keyframes pm-bar-rise { from { transform: scaleY(.15); } to { transform: scaleY(1); } }

/* ---- progress track (the 6 nodes) ---- */
.pm-seq-track { display: flex; align-items: flex-start; margin-top: 22px; }
.pm-narrow .pm-seq-track { overflow-x: auto; padding-bottom: 4px; }
.pm-seq-node { display: flex; flex-direction: column; align-items: center; gap: 9px; background: none; border: 0; cursor: pointer; padding: 0; width: 104px; flex: none; }
.pm-narrow .pm-seq-node { width: auto; }
.pm-seq-node-dot {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none;
  border: 1.5px solid var(--border-strong); background: var(--surface); color: var(--text-3);
  transition: background .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}
.pm-seq-node[data-state='done'] .pm-seq-node-dot { background: var(--accent-tint); border-color: var(--accent); color: var(--accent); }
.pm-seq-node[data-state='active'] .pm-seq-node-dot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: scale(1.08); box-shadow: 0 0 0 6px color-mix(in oklab, var(--accent) 14%, transparent); }
.pm-seq-node-l { font-size: 11.5px; font-weight: 600; color: var(--text-3); text-align: center; line-height: 1.25; transition: color .3s var(--ease); }
.pm-narrow .pm-seq-node-l { display: none; }
.pm-seq-node[data-state='active'] .pm-seq-node-l, .pm-seq-node[data-state='done'] .pm-seq-node-l { color: var(--text); }
.pm-seq-line { flex: 1; min-width: 14px; height: 2px; background: var(--border); margin-top: 20px; border-radius: 2px; position: relative; overflow: hidden; }
.pm-seq-line span { position: absolute; inset: 0; width: 0; background: var(--accent); transition: width .55s var(--ease); }
.pm-seq-line[data-done='true'] span { width: 100%; }

/* ------------------------------------------------- C) SAVINGS COMPARISON */
.pm-cmp-row { display: grid; grid-template-columns: 120px 1fr 92px; gap: 14px; align-items: center; margin-bottom: 16px; }
.pm-narrow .pm-cmp-row { grid-template-columns: 80px 1fr 70px; gap: 10px; }
.pm-cmp-row-save { margin-bottom: 4px; }
.pm-cmp-label { font-size: 13px; font-weight: 600; color: var(--text-2); line-height: 1.25; text-align: right; }
.pm-narrow .pm-cmp-label { font-size: 11.5px; }
.pm-cmp-row-save .pm-cmp-label { color: var(--positive); }
.pm-cmp-track { position: relative; height: 38px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.pm-cmp-fill { display: block; height: 100%; width: 0; border-radius: var(--radius-sm); transform-origin: left center; animation: pm-cmp-grow 1s var(--ease) both; }
@keyframes pm-cmp-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.pm-cmp-gv   { background: linear-gradient(90deg, var(--surface-3), var(--border-strong)); }
.pm-cmp-pm   { background: linear-gradient(90deg, var(--navy-700), var(--accent-600)); }
.pm-cmp-save { background: linear-gradient(90deg, var(--positive), var(--positive-400)); }
.pm-cmp-cap { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--text); text-align: right; white-space: nowrap; }
.pm-narrow .pm-cmp-cap { font-size: 13px; }
.pm-cmp-cap-save { color: var(--positive); }
.pm-cmp-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--text-3); line-height: 1.5; margin: 16px 0 0; }
.pm-cmp-note svg { flex: none; margin-top: 2px; color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .pm-cmp-fill { animation: none; } }

/* Funnel bar grow (used by admin ConversionFunnel via inline animation ref) */
@keyframes pm-funnel-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ------------------------------------------------- D) METER HELP MODAL */
.pm-modal-help { max-width: 640px; width: calc(100% - 40px); }
.pm-help-body { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: 24px; }
.pm-help-illu { position: relative; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; display: grid; place-items: center; }
.pm-help-tag { position: absolute; right: 14px; bottom: 14px; font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-tint); border: 1px solid var(--accent-tint-border); padding: 4px 9px; border-radius: 99px; }
.pm-help-text p { font-size: 14px; line-height: 1.6; color: var(--text-2); margin: 0 0 14px; }
.pm-help-text strong { color: var(--text); font-weight: 600; }
.pm-help-list { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-direction: column; gap: 10px; }
.pm-help-list li { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.pm-help-list li svg { flex: none; margin-top: 2px; color: var(--positive); }
.pm-help-hint { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--text-2); background: var(--accent-tint); border: 1px solid var(--accent-tint-border); border-radius: var(--radius-sm); padding: 12px 14px; }
.pm-help-hint svg { flex: none; margin-top: 1px; color: var(--accent); }
@media (max-width: 620px) { .pm-help-body { grid-template-columns: 1fr; } .pm-help-illu { max-width: 240px; margin: 0 auto; } }

/* field-level help trigger */
.pm-fieldhelp { display: inline-flex; align-items: center; gap: 5px; background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--font-sans); font-size: 12.5px; font-weight: 600; color: var(--accent); }
.pm-fieldhelp:hover { text-decoration: underline; }
.pm-fieldhelp svg { width: 14px; height: 14px; }

/* Vorteilsbox */
.pm-vorteil-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 13px; }
.pm-vorteil-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--text-2); }
.pm-vorteil-ic { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent); border: 1px solid var(--accent-tint-border); }

/* 5-up benefit grid */
.pm-grid-5 { grid-template-columns: repeat(5, 1fr); }
.pm-narrow .pm-grid-5 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1080px) { .pm-scroll-desk .pm-grid-5 { grid-template-columns: repeat(3, 1fr); } }
