/* ==========================================================================
   Receipt story — scroll-driven section on the home page (below the hero).
   Belege hochladen → Wir rechnen.
   Without JS or with reduced motion, the static storyboard (.rs-static) shows instead.
   ========================================================================== */

.rs { position: relative; background: #FFFDF6; }

/* ---------- Static storyboard (default; screen-reader text in motion mode) ---------- */
.rs-static { padding-top: 56px; padding-bottom: 72px; }
.rs-static .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.rs-card { padding: 28px 26px 30px; }
.rs-card .num { display: block; font-size: 13px; font-weight: 700; letter-spacing: .08em; color: var(--teal-text); margin-bottom: 6px; }
.rs-card h3 { font-size: 24px; font-weight: 600; letter-spacing: -.01em; line-height: 1.333; margin-bottom: 8px; }
.rs-card p { color: var(--gray); }
.rs-ill { position: relative; height: 150px; margin-bottom: 22px; border-radius: var(--r-lg); background: var(--cream-warm); overflow: hidden; }
.rs-ill .mini-paper { position: absolute; width: 70px; height: 92px; border-radius: 4px; background: #fff; box-shadow: var(--shadow-md);
  background-image: linear-gradient(var(--teal) 0 0), repeating-linear-gradient(180deg, var(--border-strong) 0 2px, transparent 2px 9px);
  background-size: 54px 8px, 54px 60px; background-position: 8px 10px, 8px 26px; background-repeat: no-repeat; }
.rs-ill .mini-paper:nth-child(1) { left: calc(50% - 70px); top: 30px; transform: rotate(-9deg); }
.rs-ill .mini-paper:nth-child(2) { left: calc(50% - 30px); top: 22px; transform: rotate(6deg); }
.rs-ill .mini-paper:nth-child(3) { left: calc(50% - 4px); top: 36px; transform: rotate(-2deg); }
.rs-ill .mini-sum { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow-md); }
.rs-ill .mini-sum b { font-size: 26px; font-weight: 700; color: var(--teal-text); letter-spacing: -.03em; }
.rs-ill .mini-phone { position: absolute; left: 50%; top: 14px; width: 74px; height: 150px; transform: translateX(-50%); padding: 22px 9px 0; border-radius: 16px; background: var(--navy); display: flex; flex-direction: column; gap: 7px; box-shadow: var(--shadow-md); }
.rs-ill .mini-phone i { height: 12px; border-radius: 4px; background: #FFFDF6; }
.rs-ill .mini-phone b { height: 14px; margin-top: 3px; border-radius: 4px; background: var(--teal); }
@media (max-width: 1100px) { .rs-static .grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; } }
@media (max-width: 767px) {
  /* Phones: compact cards, small picture beside the text */
  .rs-static { padding-top: 24px; padding-bottom: 8px; }
  .rs-static .grid { gap: 12px; }
  .rs-card { display: grid; grid-template-columns: 96px 1fr; column-gap: 16px; align-items: center; padding: 14px 16px 14px 14px; }
  .rs-card .rs-ill { grid-row: span 3; width: 160px; height: 156px; margin: 0; zoom: .6; }
  .rs-card .num { margin-bottom: 2px; }
  .rs-card h3 { font-size: 19px; margin-bottom: 4px; }
  .rs-card p { font-size: 14px; line-height: 1.45; }
}

/* ---------- Scroll stage (only when motion is allowed) ---------- */
.rs-stage { display: none; }
.rs--motion { height: var(--rs-h, 510vh); }   /* scroll length: all timing is a share of it, so shorter = faster */
.rs--motion .rs-static { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); }
.rs--motion .rs-stage {
  display: block; position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  background: #FFFDF6; perspective: 1200px; contain: layout paint;
}
@media (max-width: 1024px) { .rs--motion { --rs-h: 462vh; } }
@media (max-width: 640px)  { .rs--motion { --rs-h: 412vh; } }

/* Everything in the scene is placed by JS: translate(x, y) from the stage's top-left, centred on its own box */
.rs-stage .rs-el { position: absolute; left: 0; top: 0; will-change: transform, opacity; transform: translate(-200vw, 0); }

/* Captions */
.rs-caps { position: absolute; left: 0; right: 0; top: clamp(72px, 11vh, 120px); z-index: 10; text-align: center; padding: 0 20px; pointer-events: none; }
.rs-cap { position: absolute; left: 0; right: 0; opacity: 0; }
.rs-cap .rs-num { display: block; font-size: 13px; font-weight: 700; letter-spacing: .12em; color: var(--teal-text); margin-bottom: 8px; }
.rs-cap h2 { font-size: clamp(36px, 4.4vw, 56px); line-height: 1.143; font-weight: 700; letter-spacing: -.04em; color: var(--navy); }
.rs-steps { position: absolute; left: 50%; bottom: 28px; z-index: 10; display: flex; gap: 8px; transform: translateX(-50%); }
.rs-steps i { width: 28px; height: 4px; border-radius: 4px; background: var(--border-strong); transition: background-color .3s var(--ease), width .3s var(--ease); }
.rs-steps i.on { width: 44px; background: var(--teal); }

/* Papers */
.rs-paper {
  background: #fff; border-radius: .6vmin; padding: 1.6vmin 1.4vmin; display: flex; flex-direction: column; gap: 1vmin;
  box-shadow: 0 1.2vmin 2.6vmin rgba(13, 24, 70, .12), 0 .2vmin .4vmin rgba(13, 24, 70, .06);
}
.rs-paper.doc { width: 22vmin; height: 30vmin; }
.rs-paper.rcpt { width: 13vmin; height: 27vmin; border-radius: .6vmin .6vmin 0 0;
  -webkit-mask: radial-gradient(.8vmin at bottom, #0000 97%, #000) 50% / 1.6vmin 100%; mask: radial-gradient(.8vmin at bottom, #0000 97%, #000) 50% / 1.6vmin 100%; }
.rs-paper .bar { height: 2.2vmin; border-radius: .3vmin; background: var(--teal); }
.rs-paper .bar.y { background: var(--yellow); width: 60%; }
.rs-paper .t { height: 1.1vmin; width: 70%; border-radius: .3vmin; background: var(--navy); opacity: .8; }
.rs-paper .lines { flex: 1; background: repeating-linear-gradient(180deg, var(--border-strong) 0 .45vmin, transparent .45vmin 2vmin); }
.rs-paper .sum { height: 1.2vmin; width: 45%; align-self: flex-end; border-radius: .3vmin; background: var(--navy); }

/* Phones */
.rs-phone {
  width: 26vmin; aspect-ratio: 9 / 19; padding: 1.3vmin; border-radius: 4.4vmin; background: var(--navy);
  box-shadow: 0 3vmin 6vmin rgba(13, 24, 70, .3), inset 0 0 0 .25vmin #2B3554; font-size: 1.55vmin;
}
.rs-phone .screen { position: relative; height: 100%; border-radius: 3.3vmin; background: #FFFDF6; overflow: hidden; padding: 5.2em 1.2em 1.2em; display: flex; flex-direction: column; gap: .8em; }
.rs-phone .notch { position: absolute; left: 50%; top: .9em; width: 6em; height: 1.6em; transform: translateX(-50%); border-radius: 1em; background: var(--navy); }
.rs-phone .logo { width: 7.2em; }
.rs-phone h4 { font-size: 1.35em; font-weight: 700; letter-spacing: -.02em; margin-top: .3em; }
.rs-row { display: flex; align-items: center; gap: .7em; padding: .75em .8em; border-radius: .9em; background: #fff; border: 1px solid var(--border); }
.rs-row .fi { flex: none; width: 2.3em; height: 2.3em; border-radius: .7em; background: var(--teal-50); display: grid; place-items: center; color: var(--teal-text); }
.rs-row .fi svg { width: 1.2em; height: 1.2em; }
.rs-row .tx { flex: 1; display: grid; gap: .35em; }
.rs-row .tx i { display: block; height: .6em; border-radius: .3em; background: var(--navy); opacity: .75; width: 80%; }
.rs-row .tx i + i { width: 50%; opacity: .25; }
.rs-row .ok { flex: none; width: 1.5em; height: 1.5em; border-radius: 50%; background: var(--teal-text); color: #fff; display: grid; place-items: center; }
.rs-row .ok svg { width: .9em; height: .9em; stroke-width: 3; }

/* Form */
.rs-form { width: min(460px, calc(100vw - 40px)); padding: 28px 28px 24px; background: #fff; border: 1px solid var(--border); border-radius: var(--r-2xl); box-shadow: var(--shadow-lg); }
.rs-form .head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.rs-form .head b { font-size: 17px; }
.rs-form .head small { color: var(--gray); }
.rs-line { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--border-strong); font-size: 15px; }
.rs-line .l { color: var(--navy-soft); }
.rs-line .v { display: inline-block; font-weight: 700; font-variant-numeric: tabular-nums; }
.rs-total { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--teal-50); }
.rs-total span { font-weight: 700; color: var(--teal-text); }
.rs-total b { margin-left: auto; font-size: 30px; font-weight: 700; letter-spacing: -.03em; color: var(--teal-text); font-variant-numeric: tabular-nums; }
.rs-badge { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 20px; }
.rs-badge { background: var(--teal-text); color: #fff; }

/* Coin, notification */

.rs-view { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; gap: .55em; padding: 4.4em 1.1em 1.3em; background: #FFFDF6; }
.rs-reg h4 { font-size: 1.2em; white-space: nowrap; }
.rs-ok h4 { font-size: 1.35em; font-weight: 700; letter-spacing: -.02em; }
.rs-reg .sub { margin-top: -.4em; font-size: .85em; color: var(--gray); }
.rs-f { display: grid; gap: .35em; font-size: .85em; }
.rs-f > span { font-weight: 700; color: var(--navy-soft); }
.rs-f .in { display: flex; align-items: center; height: 2.4em; padding: 0 .85em; overflow: hidden; white-space: nowrap; background: #fff; border: 1px solid var(--border-strong); border-radius: .7em; font-weight: 600; color: var(--navy); transition: border-color .25s var(--ease), box-shadow .25s var(--ease); }
.rs-f.on .in { border-color: var(--teal); box-shadow: 0 0 0 .28em var(--teal-50); }
.rs-f .caret { display: none; width: 1.5px; height: 1.2em; margin-left: 1px; background: var(--teal); animation: rs-blink 1s steps(1) infinite; }
.rs-f.on .caret { display: inline-block; }
@keyframes rs-blink { 50% { opacity: 0; } }
.rs-btn { position: relative; margin-top: .4em; flex: none; height: 2.7em; display: grid; place-items: center; border-radius: .8em; background: var(--teal-text); color: #fff; font-weight: 700; font-size: .95em; box-shadow: 0 .8em 1.6em rgba(35, 138, 150, .25); }
.rs-ok { align-items: center; justify-content: center; text-align: center; gap: .55em; }
.rs-ok .ring { width: 5em; height: 5em; display: grid; place-items: center; border-radius: 50%; background: var(--success-50); color: var(--success); }
.rs-ok .ring svg { width: 2.6em; height: 2.6em; stroke-width: 2.4; stroke-dasharray: 24; stroke-dashoffset: 24; }
.rs-ok p { font-size: .9em; color: var(--gray); }
