/* Startseite: Vertrauenszeile am Schluss-CTA und die Bewegungs-Varianten (html[data-stil="1|2|3"]).
   data-stil setzt app.jsx (STIL). Bei «Bewegung reduzieren» wird es nie gesetzt, die Seite bleibt dann ruhig. */

/* ---- immer aktiv ---- */
/* Hero-Überschrift ist dreizeilig: etwas kleiner, damit die Kacheln im ersten Bildschirm bleiben */
.hero .h-display { font-size: clamp(48px, 4.7vw, 72px); }
.hero-copy-top { gap: 24px; }
.final-cta .cta-note { position: relative; margin: 0; font-size: 15px; color: rgba(255, 255, 255, 0.82); max-width: 520px; }

/* ---- Umschalter (nur localhost und *.pages.dev) ---- */
.stil-switch {
  position: fixed; left: 16px; bottom: 16px; z-index: 60;
  display: flex; align-items: center; gap: 2px; padding: 4px;
  background: #101014; border-radius: 999px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  font: 500 12px/1 var(--mono);
}
.stil-switch span { color: #9a9aa6; padding: 0 8px 0 10px; }
.stil-switch a { color: #d8d8e0; text-decoration: none; padding: 8px 12px; border-radius: 999px; }
.stil-switch a:hover { color: #fff; }
.stil-switch a.on { background: var(--accent); color: #fff; }
@media (max-width: 720px) {
  .stil-switch { bottom: 92px; left: 8px; }
  .stil-switch span { display: none; }
  .stil-switch a { padding: 8px 9px; }
}

/* ---- Variante 1–3: Einblenden beim Scrollen ---- */
html[data-stil] [data-dy] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--dy-d, 0ms);
}
html[data-stil] [data-dy="in"] { opacity: 1; transform: none; }

/* Hero baut sich beim Laden auf. Das Porträt bleibt sichtbar (grösstes Bild der Seite), es fährt nur leicht ein. */
@keyframes dyRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes dyZoom { from { transform: scale(1.06); } to { transform: scale(1); } }
html[data-stil] .hero-copy-top > * { animation: dyRise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
html[data-stil] .hero-copy-top > :nth-child(2) { animation-delay: 0.08s; }
html[data-stil] .hero-copy-top > :nth-child(3) { animation-delay: 0.16s; }
html[data-stil] .hero-copy-top > :nth-child(4) { animation-delay: 0.24s; }
html[data-stil] .hero-copy-top > :nth-child(5) { animation-delay: 0.32s; }
html[data-stil] .hero .fact-tile { animation: dyRise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: 0.42s; }
html[data-stil] .hero .fact-tile:nth-child(2) { animation-delay: 0.5s; }
html[data-stil] .hero .fact-tile:nth-child(3) { animation-delay: 0.58s; }
html[data-stil] .hero-portrait img { animation: dyZoom 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

/* Knöpfe und Karten reagieren auf den Zeiger */
html[data-stil] .btn { transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease; }
html[data-stil] .btn:hover { transform: translateY(-2px); }
html[data-stil] .btn:active { transform: translateY(0); }
html[data-stil] .btn-dark:hover, html[data-stil] .btn-primary:hover { box-shadow: 0 10px 24px rgba(var(--accent-rgb), 0.22); }
html[data-stil] .bento-card { transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
html[data-stil] .bento-card[data-dy="in"]:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(16, 16, 20, 0.1); }

/* ---- Variante 2 «Lebendig» ---- */
@keyframes dyWord { from { opacity: 0; transform: translateY(0.45em); } to { opacity: 1; transform: none; } }
html[data-stil="2"] .hero-word { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: 0.08em; margin-bottom: -0.08em; }
html[data-stil="2"] .hero-word-in { display: inline-block; animation: dyWord 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }

.hero-ticker {
  position: absolute; bottom: 104px; left: 16px; right: 16px; z-index: 2;
  display: flex; flex-direction: column; gap: 8px; padding: 14px 16px;
  background: rgba(16, 16, 20, 0.78); color: #fff; border-radius: 14px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  animation: dyRise 0.7s 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero-ticker-label { font: 500 11px/1 var(--mono); color: #b9b9c4; letter-spacing: 0.02em; }
.hero-ticker-step { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; line-height: 1.3; animation: dyRise 0.4s ease both; }
.hero-ticker-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: #35c27a; }
.hero-ticker-dot.wait { background: #ffb020; }
.hero-ticker-bar { height: 2px; background: rgba(255, 255, 255, 0.18); border-radius: 1px; overflow: hidden; }
.hero-ticker-bar span { display: block; height: 2px; background: #fff; transition: width 0.5s ease; }

html[data-stil="2"] .bento-card { position: relative; }
html[data-stil="2"] .bento-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0;
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), 0.13), transparent 70%);
  transition: opacity 0.25s ease;
}
html[data-stil="2"] .bento-dark::after { background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.12), transparent 70%); }
html[data-stil="2"] .bento-card:hover::after { opacity: 1; }

/* ---- Variante 3 «Kino» ---- */
html[data-stil="3"] body::before {
  content: ""; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 200;
  background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--dy-progress, 0));
}
html[data-stil="3"] .hero { overflow: hidden; }
html[data-stil="3"] .hero-grid { position: relative; z-index: 1; }
.hero-flow { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero-flow path { stroke: rgba(var(--accent-rgb), 0.09); stroke-width: 1.2; }
.hero-flow path.lg-comet, .hero-flow path.lg-comet-slow { stroke: rgba(var(--accent-rgb), 0.5); stroke-width: 1.6; stroke-linecap: round; }
/* Abschnittstitel fahren von unten aus einer Maske */
html[data-stil="3"] .h-section[data-dy], html[data-stil="3"] [data-dy] > .h-section { transition: opacity 0.6s ease, transform 0.7s ease, clip-path 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
html[data-stil="3"] [data-dy] { transform: translateY(36px); transition-duration: 0.8s, 0.9s; }
html[data-stil="3"] [data-dy="in"] { transform: none; }
html[data-stil="3"] [data-dy] .h-section { clip-path: inset(0 0 100% 0); transition: clip-path 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s; }
html[data-stil="3"] [data-dy="in"] .h-section { clip-path: inset(-10% -5% -15% -5%); }

@media (max-width: 720px) {
  html[data-stil] [data-dy] { transform: translateY(14px); }
  .hero-ticker { bottom: 100px; left: 12px; right: 12px; padding: 12px 14px; }
  .hero-ticker-step { font-size: 14px; }
  .hero-flow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-stil] [data-dy] { opacity: 1; transform: none; transition: none; }
  html[data-stil] .hero *, .hero-ticker, .hero-ticker-step { animation: none !important; }
}
