/* ==========================================================================
   Donna AI — Punkte-Effekte (Staging „donna-punkte“)
   Trichter-Section .pf + Halbton-Wortmarke .footer__dots. Logik: js/punkte.js
   Geometrie in Prozent der Trichterfläche 1116 × 320 (wie landing-funnel-streams.ts):
   Karten x0 = 96 / 340 / 584 / 828, Breite 192, oben 40, Höhe 240.
   ========================================================================== */

/* ---------- Trichter ---------- */
.pf {
  position: relative; padding: 112px 0 56px; background: var(--bg); overflow: clip;
  /* Punktfarben (OKLCH), Blau-Grau der Seite */
  --pf-dot-l: .80; --pf-dot-c: .06;
  --pf-warm-l: .93; --pf-warm-c: .05;
}
.pf__head { width: 760px; max-width: 100%; margin: 0 auto 56px; }
.pf__head .h2 { line-height: 1; }
.pf__head .sub { max-width: 600px; }

.pf-wrap { position: relative; max-width: 1116px; margin: 0 auto; }
.pf-label {
  margin: 0 0 14px; font: 400 12px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--eyebrow-muted);
}
.pf-stage { position: relative; width: 100%; aspect-ratio: 1116 / 320; container-type: inline-size; }

/* Punkte über die volle Fensterbreite, an beiden Rändern weich ausgeblendet */
.pf-streams {
  position: absolute; z-index: 0; top: 0; bottom: 0; left: calc(50% - 50vw); width: 100vw;
  pointer-events: none; opacity: 1;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1600ms cubic-bezier(.22, .61, .36, 1);
}
.pf.is-in .pf-streams { clip-path: inset(0 0 0 0); }
.pf-streams canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }

/* Glas-Karten: Donna-Glas (weißer Rand .14, Innenkante .12), aber dünne Unschärfe wie im Original,
   damit die Punkte dahinter weich sichtbar bleiben */
.pf-card {
  position: absolute; z-index: 1; left: var(--p); top: 12.5%; width: 17.204%; height: 75%;
  display: flex; flex-direction: column; padding: 18px; border-radius: 20px; isolation: isolate;
  background: linear-gradient(165deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .03) 58%), rgba(16, 16, 20, .38);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 24px 48px -28px rgba(0, 0, 0, .85);
  -webkit-backdrop-filter: blur(9px) saturate(170%); backdrop-filter: blur(9px) saturate(170%);
  opacity: 0; translate: 0 8px; transition: opacity .45s ease, translate .45s ease;
}
.pf-card.is-in { opacity: 1; translate: 0 0; }
.pf-card::before { /* Glanzkante */
  content: ''; position: absolute; inset: -1px; z-index: -1; padding: 1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, .42), transparent 30%, transparent 62%, rgba(163, 179, 209, .22));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.pf-card::after { /* Lichtfleck oben links, Blau-Grau-Schimmer unten rechts */
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 70% at 0% 0%, rgba(255, 255, 255, .07), transparent 55%),
              radial-gradient(90% 60% at 100% 100%, rgba(135, 156, 196, .12), transparent 60%);
}
.pf-card--acc {
  background: radial-gradient(120% 100% at 0% 0%, rgba(135, 156, 196, .30) 0%, rgba(135, 156, 196, 0) 75%), rgba(16, 16, 20, .30);
  border-color: rgba(163, 179, 209, .32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 0 32px rgba(135, 156, 196, .22), 0 24px 48px -28px rgba(0, 0, 0, .85);
}
.pf-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 18px; }
.pf-card__label { font: 500 11px/1.2 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--eyebrow); white-space: nowrap; }
.pf-card__icon { width: 17px; height: 17px; flex: none; color: var(--text-60); }
.pf-card__apps { display: flex; gap: 3px; }
.pf-card__apps img { width: 16px; height: 16px; object-fit: contain; }
.pf-card__fill { flex: 1; }
.pf-card__title { margin: 0; font: 500 clamp(19px, 2.1cqw, 24px)/1.08 var(--font-display); letter-spacing: -.01em; color: #fff; }
.pf-card--acc .pf-card__title { color: var(--btn-to); }
.pf-card__text { margin: 8px 0 0; min-height: 2.9em; font: 400 13px/1.45 var(--font-ui); color: var(--text-60); }
.pf-live { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--btn-to); box-shadow: 0 0 10px rgba(177, 191, 216, .8); }
.pf-live::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid rgba(177, 191, 216, .5); animation: pf-ping 2.4s ease-out infinite; }
@keyframes pf-ping { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }

/* Ergebnis-Band rechts der letzten Karte (wie h-reply-belt): fertige Arbeit fährt zum Fensterrand */
.pf-belt {
  --run: calc(50vw - 50cqw + 11.828cqw - 14px);
  position: absolute; z-index: 1; left: calc(88.172% + 14px); width: var(--run); top: 12.5%; height: 75%;
  overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .5s ease;
}
.pf.is-done .pf-belt { opacity: 1; }
.pf-reply {
  position: absolute; left: 0; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  translate: 0 -50%; transform-origin: left center; white-space: nowrap; border-radius: 999px;
  font: 500 11.5px/1 var(--font-ui); color: var(--text-80);
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(12px) saturate(140%); backdrop-filter: blur(12px) saturate(140%);
  opacity: 0; animation: pf-belt 18s linear infinite;
}
.pf-reply svg { width: 12px; height: 12px; flex: none; color: var(--eyebrow); }
@keyframes pf-belt {
  0%    { transform: translateX(0) scale(.6); opacity: 0; }
  1.5%  { transform: translateX(calc((var(--run) - 100%) * .0476)) scale(1.06); opacity: 1; }
  3%    { transform: translateX(calc((var(--run) - 100%) * .0952)) scale(1); }
  30%   { opacity: 1; }
  31.5% { transform: translateX(calc(var(--run) - 100%)) scale(1); opacity: 0; }
  100%  { transform: translateX(calc(var(--run) - 100%)) scale(1); opacity: 0; }
}

/* ---------- Mobil/Tablet: der Trichter steht senkrecht, die Punkte fallen von oben durch die Karten ---------- */
@media (max-width: 1023px) {
  .pf { padding: 64px 0 80px; }
  .pf__head { margin-bottom: 40px; }
  .pf-wrap { max-width: 400px; }
  .pf-label { text-align: center; margin-bottom: 44px; }
  .pf-stage { aspect-ratio: 320 / 1116; }
  .pf-streams {
    top: -40px; bottom: 0;
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 40px, #000 calc(100% - 24px), transparent);
            mask-image: linear-gradient(180deg, transparent, #000 40px, #000 calc(100% - 24px), transparent);
    clip-path: inset(0 0 100% 0);
  }
  .pf-card { left: 12.5%; top: var(--p); width: 75%; height: 17.204%; padding: 16px 18px; }
  .pf-card__title { font-size: 22px; }
  .pf-card__text { font-size: 14px; min-height: 0; }
  .pf-belt { display: none; }
}

/* ---------- Halbton-Wortmarke im Footer ---------- */
.footer__dots {
  position: absolute; z-index: 0; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(1340px, calc(100% - 48px)); aspect-ratio: 4.6;
  --pf-ink: #39445a; --pf-ink-warm: #dfe6f3; --pf-grain-op: .22;
  opacity: 0; transition: opacity .6s ease;
}
.footer__dots.is-ready { opacity: 1; }
.footer__dots canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.footer__main, .footer__bar { z-index: 1; }
/* Leiste über die Wortmarke heben (Wortmarke ≈ Breite / 7,45 hoch), damit Links nicht auf den Punkten liegen */
@media (min-width: 1024px) {
  .footer__box { height: 700px; }
  .footer__bar { bottom: calc(min(1340px, 100vw - 88px) * .134 + 18px); }
}

@media (max-width: 1023px) {
  .footer__dots { order: 2; position: relative; left: auto; bottom: auto; transform: none; width: calc(100% - 24px); margin: 28px auto 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pf-streams, .pf-card, .pf-belt, .footer__dots { transition: none; }
  .pf-reply { animation: none; opacity: 1; transform: translateX(calc((var(--run) - 100%) * .3)); }
  .pf-reply:nth-child(n + 5) { display: none; }
  .pf-live::after { animation: none; }
}
