:root { --flame: #d9480f; --night: #17140f; }
body { overflow-x: clip; background: var(--night); }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 40px); }
h1, h2, h3 { font-weight: 800; letter-spacing: -.045em; line-height: .98; margin: 0; }

.top { position: fixed; z-index: 30; top: 10px; left: 50%; transform: translateX(-50%); width: min(620px, calc(100% - 20px)); display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 6px 12px; background: #fff; border-radius: 999px; box-shadow: 0 8px 24px rgba(23, 20, 15, .22); }
.top .site-brand { font-size: .95rem; }
.top .site-brand img { width: 30px; height: 30px; }
.top-get { background: var(--night); color: #fff; font-weight: 700; font-size: .9rem; text-decoration: none; padding: 9px 16px; border-radius: 999px; }

.get { display: inline-block; line-height: 0; transition: transform .18s; }
.get img { height: clamp(66px, 9svh, 84px); width: auto; }
.get:hover { transform: scale(1.04); }
.get:active { transform: scale(.97); }

/* Without animation: a plain headline, the finished bill and the steps as a list */
.film { background: var(--flame); color: #fff; }
.pin { position: relative; padding: 96px 18px 56px; text-align: center; }
.night, .progress, .meter, .tape, .paper, .sent, .strip, .slab, .back { display: none; }
.hero h1 { font-size: clamp(2.6rem, min(13vw, 10svh), 8rem); }
.hero h1 span { display: block; }
.hero p { font-size: 1.25rem; font-weight: 600; margin: 16px 0 20px; }
.rig { margin: 36px auto 0; width: min(300px, 76vw); }
.face { display: none; width: 100%; height: auto; border-radius: 26px; border: 8px solid var(--night); }
.face:first-child { display: block; content: url('/assets/screens/new-bill.webp'); }
.caps { list-style: none; margin: 32px auto 0; padding: 0; max-width: 34em; }
.caps h2 { font-size: 1.6rem; letter-spacing: -.03em; }
.caps p { margin: 4px 0 22px; }

/* The film: one pinned stage driven by scrolling */
.anim .film { height: 720vh; }
.anim .pin { position: sticky; top: 0; height: 100svh; padding: 0; overflow: hidden; text-align: left; }
.anim .night { display: block; position: absolute; inset: 0; background: var(--night); opacity: 0; }
.anim .progress { display: block; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .2); z-index: 9; }
.progress i { display: block; height: 100%; background: #fff; transform: scaleX(0); transform-origin: 0 50%; }

.anim .hero { position: absolute; z-index: 4; left: 0; right: 0; top: 0; padding-top: clamp(78px, 11svh, 110px); text-align: center; will-change: transform, opacity; }
.anim .hero h1 { font-size: clamp(2.5rem, min(8.6vw, 12.5svh), 8.6rem); }
.anim .hero h1 span { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; animation: rise .9s cubic-bezier(.2, .8, .2, 1) both; }
.anim .hero h1 span:nth-of-type(2) { animation-delay: .07s; }
.anim .hero h1 span:nth-of-type(3) { animation-delay: .14s; }
.anim .hero h1 span:nth-of-type(4) { animation-delay: .21s; }
@keyframes rise { from { transform: translateY(70%); opacity: 0; } }
.anim .hero p { margin: 8px 0 14px; }

.anim .rig { position: absolute; z-index: 3; left: 50%; top: 50%; width: 0; height: 0; margin: 0; perspective: 1500px; animation: lift 1.1s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes lift { from { transform: translateY(26vh); opacity: 0; } }
.device { --h: min(80svh, 740px); }
.anim .device { position: absolute; left: calc(var(--h) * -.235); top: calc(var(--h) * -.5); width: calc(var(--h) * .47); height: var(--h); transform-style: preserve-3d; will-change: transform; }
.anim .slab, .anim .back, .anim .front { display: block; position: absolute; inset: 0; border-radius: calc(var(--h) * .07); }
.anim .slab { background: #2a2620; }
.anim .slab:nth-child(1) { transform: translateZ(-3px); }
.anim .slab:nth-child(2) { transform: translateZ(-6px); }
.anim .slab:nth-child(3) { transform: translateZ(-9px); }
.anim .slab:nth-child(4) { transform: translateZ(-12px); }
.anim .back { background: #211d17; transform: translateZ(-14px) rotateY(180deg); backface-visibility: hidden; display: grid; place-items: center; }
.anim .back img { width: 24%; height: auto; border-radius: 22%; }
.anim .front { background: #0f0d0a; padding: calc(var(--h) * .012); transform-style: preserve-3d; backface-visibility: hidden; box-shadow: 0 0 0 2px #57503f, 0 40px 90px -20px rgba(0, 0, 0, .6); }
.anim .face, .anim .strip { position: absolute; inset: calc(var(--h) * .012); width: calc(100% - var(--h) * .024); height: calc(100% - var(--h) * .024); border: 0; object-fit: fill; backface-visibility: hidden; }
.anim .face { display: block; content: normal; border-radius: calc(var(--h) * .058); opacity: 0; }
.anim .face.on { opacity: 1; }
.anim .strip { display: block; opacity: 0; will-change: transform, opacity; }
.s1 { clip-path: inset(14.34% 0 78.55% 0); }
.s2 { clip-path: inset(28.55% 0 64.34% 0); }
.s3 { clip-path: inset(35.66% 0 57.23% 0); }
.s4 { clip-path: inset(49.88% 0 43.01% 0); }
.s5 { clip-path: inset(83.53% 3.08% 8.65% 3.08%); }

.anim .words-left { position: absolute; z-index: 5; left: clamp(20px, 8vw, 130px); top: 50%; width: min(46vw, 640px); transform: translateY(-50%); pointer-events: none; }
.anim .meter { display: flex; align-items: flex-start; font-size: clamp(4rem, 11.5vw, 11rem); font-weight: 800; line-height: 1; letter-spacing: -.05em; height: 1em; overflow: hidden; font-variant-numeric: tabular-nums; opacity: 0; will-change: opacity; }
.digit { display: inline-block; height: 1em; width: .62em; overflow: hidden; text-align: center; letter-spacing: 0; }
.digit i { display: block; font-style: normal; will-change: transform; }
.digit i b { display: block; height: 1em; font-weight: 800; }
.comma { margin: 0 -.09em 0 -.04em; }
.anim .tape { display: block; list-style: none; margin: 14px 0 0; padding: 0; font-size: clamp(1rem, 1.7vw, 1.4rem); font-weight: 600; opacity: 0; }
.tape li { display: flex; justify-content: space-between; max-width: 22em; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .28); opacity: .0; transform: translateY(10px); transition: opacity .25s, transform .25s; }
.tape li.on { opacity: 1; transform: none; }
.anim .caps { position: absolute; left: 0; right: 0; top: 50%; margin: 0; max-width: none; transform: translateY(-50%); height: 12em; }
.anim .caps li { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; opacity: 0; transform: translateY(30px) scale(.97); transform-origin: 0 50%; transition: opacity .35s, transform .35s; }
.anim .caps li.on { opacity: 1; transform: none; }
.anim .caps h2 { font-size: clamp(2.6rem, 6.2vw, 6rem); letter-spacing: -.045em; }
.anim .caps p { font-size: clamp(1.05rem, 1.8vw, 1.4rem); margin-top: 14px; max-width: 24em; opacity: .85; }

.anim .paper { display: block; position: absolute; z-index: 6; left: 50%; top: 50%; width: min(44vh, 400px); height: auto; margin-left: calc(min(44vh, 400px) / -2); margin-top: calc(min(44vh, 400px) * -.65); border-radius: 12px; box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .7); opacity: 0; will-change: transform, opacity; }
.anim .sent { display: block; position: absolute; z-index: 7; left: 50%; top: 50%; margin: 0; background: #16a34a; color: #fff; font-weight: 700; padding: 12px 20px; border-radius: 999px; white-space: nowrap; opacity: 0; will-change: transform, opacity; }

/* Wall of real screens */
.wall { background: var(--night); color: #fff; }
.anim .wall { height: 240vh; }
.wall-pin { position: relative; height: 100svh; overflow: hidden; display: grid; place-items: center; }
.anim .wall-pin { position: sticky; top: 0; }
.plane { position: absolute; left: 50%; top: 50%; width: 170vmax; display: flex; justify-content: center; gap: 2.2vmax; transform: translate(-50%, -50%) perspective(1600px) rotateX(38deg) rotateZ(-20deg); opacity: .5; }
.col { flex: 0 0 14vmax; display: flex; flex-direction: column; gap: 2.2vmax; will-change: transform; }
.col img { display: block; width: 100%; height: auto; border-radius: 1.6vmax; }
.wall-title { position: relative; z-index: 2; text-align: center; padding: 0 18px; font-size: clamp(3rem, 10.5vw, 10rem); text-shadow: 0 6px 60px rgba(23, 20, 15, .95), 0 2px 12px rgba(23, 20, 15, .7); max-width: 10em; }

/* Big words light up as they pass the middle */
.list { background: var(--night); color: #fff; padding: 60px 0 clamp(90px, 14vh, 160px); }
.row { display: grid; grid-template-columns: 1.3fr 1fr; gap: 8px 40px; align-items: baseline; padding: clamp(14px, 2.4vh, 26px) 0; border-bottom: 1px solid #3a352c; transition: color .25s; }
.row h3 { font-size: clamp(2.6rem, 8vw, 7rem); }
.row p { margin: 0; font-size: clamp(1.05rem, 1.7vw, 1.35rem); }
.anim .row { color: #8f887b; }
.anim .row.on { color: #fff; }
.anim .row.on h3 { color: #fb923c; }

/* Try it */
.try { background: #fff; color: var(--ink); padding: clamp(72px, 11vw, 140px) 0; border-radius: 36px 36px 0 0; }
.try-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 6vw, 80px); align-items: center; }
.try h2 { font-size: clamp(2.8rem, 7vw, 5.4rem); }
.try-sub { font-size: 1.2rem; margin: 12px 0 0; color: var(--muted); }
.try-total { font-size: clamp(4.4rem, 12vw, 10rem); font-weight: 800; letter-spacing: -.05em; line-height: 1; color: var(--flame); margin: 24px 0 0; font-variant-numeric: tabular-nums; }
.try-count { margin: 6px 0 0; font-weight: 600; }
.demo { background: var(--mist); border-radius: 28px; padding: 16px; }
.chips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.chips button { font: inherit; text-align: left; background: #fff; color: var(--ink); border: 0; border-radius: 16px; padding: 12px 14px; min-height: 62px; cursor: pointer; transition: transform .12s, box-shadow .15s; }
.chips button span { display: block; font-weight: 700; line-height: 1.25; }
.chips button small { color: var(--muted); }
.chips button:hover { box-shadow: 0 0 0 2px var(--flame); }
.chips button:active { transform: scale(.94); }
.demo-lines { list-style: none; margin: 10px 6px 0; padding: 0; }
.demo-lines:empty { display: none; }
.demo-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); animation: line-in .22s ease-out; }
@keyframes line-in { from { opacity: 0; transform: translateY(-8px); } }
.demo-lines em { font-style: normal; font-weight: 800; color: var(--flame); margin-right: 4px; }
.demo-actions { display: flex; gap: 8px; margin-top: 12px; }
.demo-send, .demo-clear { font: inherit; font-weight: 700; padding: 14px 18px; border-radius: 14px; cursor: pointer; }
.demo-send { flex: 1; background: var(--flame); color: #fff; border: 0; }
.demo-send:disabled { background: #e7e3db; color: #6f6a60; cursor: default; }
.demo-clear { background: #fff; color: var(--ink); border: 0; }
.demo-note { margin: 10px 6px 0; font-size: .95rem; font-weight: 600; min-height: 1.5em; color: #0b6b3f; }

.end { background: var(--flame); color: #fff; text-align: center; padding: clamp(90px, 15vw, 200px) 0; }
.end h2 { font-size: clamp(3.2rem, 11.5vw, 10rem); }
.end p { font-size: 1.2rem; margin: 20px 0 28px; }

.lite .front, .lite .paper { box-shadow: none; }
.lite .slab:nth-child(2), .lite .slab:nth-child(3) { display: none; }

@media (max-width: 860px) {
  .top .site-brand { font-size: .9rem; }
  .device { --h: min(58svh, 112vw); }
  .anim .hero h1 { font-size: clamp(2.5rem, min(14.6vw, 8.6svh), 5.6rem); }
  .anim .hero h1 span { display: block; }
  .hero h1 br { display: none; }
  .anim .hero { padding-top: 70px; }
  .anim .words-left { left: 18px; right: 18px; top: 68px; width: auto; transform: none; text-align: center; }
  .anim .meter { justify-content: center; font-size: clamp(3.4rem, 17svh, 22vw); }
  .anim .tape { position: relative; height: 2.2em; margin-top: 8px; }
  .tape li { position: absolute; left: 0; right: 0; max-width: none; justify-content: center; gap: 10px; border: 0; }
  .tape li.on:not(.latest) { opacity: 0; }
  .anim .caps { top: 0; transform: none; height: 8em; }
  .anim .caps li { justify-content: flex-start; align-items: center; }
  .anim .caps h2 { font-size: clamp(2.2rem, 10.6vw, 3.6rem); }
  .anim .caps p { margin-top: 8px; }
  .anim .paper { width: min(38svh, 76vw); margin-left: calc(min(38svh, 76vw) / -2); margin-top: calc(min(38svh, 76vw) * -.5); }
  .plane { width: 220vmax; opacity: .42; }
  .col { flex-basis: 19vmax; }
  .row { grid-template-columns: 1fr; }
  .try-grid { grid-template-columns: 1fr; }
}
