/* Vorschaltseite „Demnächst" — Farben und Schrift wie die Landingpage (styles.css). */
:root {
  --dark: #0f172a;
  --accent: #0d9488;
  --accent-light: #2dd4bf;
  --muted: #94a3b8;
  --cycle: 9s;            /* eine Runde „Rechnung entsteht" */
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  font-family: Inter, system-ui, sans-serif;
  color: #fff;
  background: radial-gradient(circle at 50% -10%, #1e293b, var(--dark) 65%) fixed;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
body::before {               /* Punktraster wie im Hero */
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 30%, transparent 100%);
  pointer-events: none;
}

/* Wandernde Lichtflecken */
.glow {
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  pointer-events: none;
}
.glow-a { background: #0d9488; top: -160px; left: -120px; animation: drift-a 22s ease-in-out infinite alternate; }
.glow-b { background: #1d4ed8; bottom: -200px; right: -140px; opacity: 0.22; animation: drift-b 26s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(38vw, 22vh) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-34vw, -18vh) scale(0.9); } }

.stage {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  text-align: center;
}

/* Logo mit langsam drehendem Zahnrad */
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 36px; animation: rise 1s ease-out both; }
.gear { width: 44px; height: 44px; }
.gear-spin { transform-origin: 32px 32px; animation: spin 14s linear infinite; }
.brand-text { font-size: 1.7rem; font-weight: 600; letter-spacing: -0.01em; }
.brand-text span { color: var(--accent-light); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Szene: das Rechnungsblatt ──────────────────────────────────────────── */
.scene { perspective: 900px; margin-bottom: 40px; animation: rise 1s 0.2s ease-out both; }
.paper {
  position: relative;
  width: 260px;
  height: 330px;
  padding: 26px 24px;
  border-radius: 12px;
  background: #f8fafc;
  box-shadow: 0 30px 80px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.08);
  transform: rotateX(8deg) rotateY(-12deg);
  animation: float 6s ease-in-out infinite;
  text-align: left;
}
@keyframes float {
  0%, 100% { transform: rotateX(8deg) rotateY(-12deg) translateY(0); }
  50%      { transform: rotateX(4deg) rotateY(-6deg) translateY(-10px); }
}

.paper-head { display: flex; justify-content: space-between; margin-bottom: 26px; }
.bar { display: block; height: 12px; border-radius: 6px; }
.bar-logo { width: 54px; height: 20px; background: linear-gradient(135deg, #0d9488, #0f766e); }
.bar-addr { width: 70px; background: #cbd5e1; }

/* Jede Linie wächst zu ihrer Breite (--w), bleibt, und verschwindet am Ende der Runde.
   Gleiche Dauer für alle → die Verzögerungen bleiben über die Runden synchron. */
.line, .row i, .row b, .total i, .total b {
  display: block;
  height: 9px;
  border-radius: 5px;
  background: #cbd5e1;
  width: 0;
  animation: write var(--cycle) ease-out infinite;
}
.line { margin-bottom: 10px; }
.l1 { --w: 62%; animation-delay: 0.3s; }
.l2 { --w: 44%; animation-delay: 0.6s; margin-bottom: 26px; }

.rows { border-top: 1px solid #e2e8f0; padding-top: 14px; }
.row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.row i { background: #94a3b8; }
.row b { background: #64748b; }
.r1 i { --w: 58%; animation-delay: 1.1s; }  .r1 b { --w: 20%; animation-delay: 1.4s; }
.r2 i { --w: 46%; animation-delay: 1.7s; }  .r2 b { --w: 16%; animation-delay: 2.0s; }
.r3 i { --w: 52%; animation-delay: 2.3s; }  .r3 b { --w: 22%; animation-delay: 2.6s; }

.total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 2px solid #0f172a;
}
.total i { --w: 28%; height: 11px; background: #0f172a; animation-delay: 3.1s; }
.total b { --w: 30%; height: 14px; background: var(--accent); animation-delay: 3.4s; }

@keyframes write {
  0%   { width: 0; opacity: 1; }
  9%   { width: var(--w); }
  84%  { width: var(--w); opacity: 1; }
  92%  { width: var(--w); opacity: 0; }
  100% { width: 0; opacity: 0; }
}

/* Siegel wird aufgesetzt */
.stamp {
  position: absolute;
  right: 18px;
  bottom: 30px;
  padding: 6px 12px;
  border: 3px solid var(--accent);
  border-radius: 8px;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  animation: stamp var(--cycle) ease-out infinite;
}
@keyframes stamp {
  0%, 44% { opacity: 0; transform: rotate(-14deg) scale(2.2); }
  50%     { opacity: 1; transform: rotate(-14deg) scale(0.92); }
  54%     { transform: rotate(-14deg) scale(1); }
  84%     { opacity: 1; transform: rotate(-14deg) scale(1); }
  92%, 100% { opacity: 0; transform: rotate(-14deg) scale(1); }
}

/* ── Text ───────────────────────────────────────────────────────────────── */
.headline { font-size: clamp(1.8rem, 5vw, 2.8rem); font-weight: 700; letter-spacing: -0.02em; animation: rise 1s 0.4s ease-out both; }
.sub { margin-top: 12px; font-size: 1.1rem; color: var(--muted); animation: rise 1s 0.6s ease-out both; }
.dots span { animation: blink 1.4s infinite both; }
.dots span:nth-child(2) { animation-delay: 0.2s; }
.dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.15; } 40% { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.foot {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 18px 16px 22px;
  font-size: 0.85rem;
  color: var(--muted);
}
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: #fff; }

@media (max-width: 480px) {
  .paper { width: 230px; height: 310px; padding: 22px 18px; }
  .stamp { bottom: 16px; right: 14px; font-size: 0.78rem; }
  .scene { margin-bottom: 28px; }
  .brand { margin-bottom: 24px; }
}

/* Wer weniger Bewegung möchte, bekommt das fertige Blatt als Standbild */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .line, .row i, .row b, .total i, .total b { width: var(--w); }
  .stamp { opacity: 1; transform: rotate(-14deg); }
  .paper { transform: rotateX(6deg) rotateY(-9deg); }
}
