/* The 40-second landing-page film: the problem, a drop of 48 files, CostShade reading every file,
   "31 of 48 had prices or tax", a before/after of one invoice, the download, and why it matters.
   Pure CSS + a tiny timeline (film.js), no libraries, no third-party requests. The screen is sized in
   em from its own width, so it scales with the page. The captions are a large strip at the TOP of the
   screen, inside the frame (never below it). Before the script starts the film, the first frame is
   shown (class film-ready); without the script, or when motion is reduced, the page shows the
   results scene as a still picture. */

.film-fig { margin: 0; width: 100%; max-width: 62rem; margin-inline: auto; container-type: inline-size; }
.film-card { border: 1px solid var(--line-strong); border-radius: 1.2rem; overflow: hidden; background: var(--surface);
  box-shadow: var(--shadow-md, 0 18px 40px rgba(14, 23, 38, 0.12)); }
.film {
  --paper: #ffffff; --paper-ink: #263143; --paper-mute: #8691a1; --paper-line: #e3e7ec;
  position: relative; font-size: 12px; font-size: clamp(8px, 2.15cqw, 17px);
  aspect-ratio: 16 / 11.8; background: var(--surface); overflow: hidden; color: var(--ink);
  display: flex; flex-direction: column;
}
.film .chrome { flex: 0 0 auto; height: 2.4em; display: flex; align-items: center; gap: 0.5em;
  padding: 0 1em; background: var(--bg-subtle); border-bottom: 1px solid var(--line); z-index: 5; }
.film .chrome i { width: 0.7em; height: 0.7em; border-radius: 50%; background: var(--line-strong); }
.film .chrome span { margin-left: 0.8em; font-size: 0.85em; color: var(--muted); background: var(--surface); border: 1px solid var(--line);
  padding: 0.15em 1em; border-radius: 99px; }
.film .stage { position: relative; flex: 1 1 auto; min-height: 0; }
.film .bar { position: absolute; left: 0; bottom: 0; height: 0.28em; width: 0; background: var(--btn); z-index: 6; }

/* scenes */
.film .sc { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 1.4em 2em; text-align: center; opacity: 0; visibility: hidden; transition: opacity 0.45s ease, visibility 0s linear 0.45s; }
.film .sc.on { opacity: 1; visibility: visible; transition: opacity 0.45s ease; }
.film:not(.film-live):not(.film-ready) .sc[data-s="3"] { opacity: 1; visibility: visible; }   /* the still picture (no script / reduced motion) */
.film.film-ready:not(.film-live) .sc[data-s="0"] { opacity: 1; visibility: visible; transition: none; }  /* the first frame, shown at once */
.film .sc-row { flex-direction: row; gap: 1.8em; text-align: left; justify-content: center; }
.film .sc-row .txt { flex: 1 1 45%; }
.film .sc-row .inv-wrap { flex: 0 0 24em; }
.film .big { font-size: 2.3em; font-weight: 750; letter-spacing: -0.03em; line-height: 1.12; }
.film .big em { font-style: normal; color: var(--accent); }
.film .mid { font-size: 1.5em; font-weight: 700; letter-spacing: -0.02em; }
.film .sub { color: var(--muted); font-size: 1.05em; margin-top: 0.5em; }
.film .rise { opacity: 0; transform: translateY(0.8em); transition: opacity 0.4s ease, transform 0.4s ease; }
.film .sc.on .rise { opacity: 1; transform: none; }
.film .sc.on .d1 { transition-delay: 0.05s; } .film .sc.on .d2 { transition-delay: 0.25s; } .film .sc.on .d3 { transition-delay: 0.45s; }
.film .sc.on .d4 { transition-delay: 3.6s; } .film .sc.on .d5 { transition-delay: 4.3s; }
.film:not(.film-live):not(.film-ready) .sc[data-s="3"] .rise { opacity: 1; transform: none; }
.film.film-ready:not(.film-live) .sc[data-s="0"] .rise { opacity: 1; transform: none; transition: none; }

/* paper invoice (shared by scene 0 and 4) */
.film .inv { background: var(--paper); color: var(--paper-ink); border-radius: 0.6em; border: 1px solid var(--paper-line);
  box-shadow: 0 0.6em 1.6em rgba(14, 23, 38, 0.14); padding: 1em 1.2em; font-size: 0.82em; text-align: left; width: 27em; max-width: 100%; }
.film .inv .ih { display: flex; justify-content: space-between; font-weight: 700; letter-spacing: 0.04em; margin-bottom: 0.7em; }
.film .inv .ih span { font-weight: 500; color: var(--paper-mute); letter-spacing: 0; }
.film .inv .supl { font-size: 0.92em; color: var(--paper-mute); margin: -0.3em 0 0.6em; }
.film .inv table { width: 100%; border-collapse: collapse; }
.film .inv th { font-size: 0.78em; text-transform: uppercase; letter-spacing: 0.07em; color: var(--paper-mute); text-align: left; padding: 0.4em 0.3em; border-bottom: 1.5px solid var(--paper-line); }
.film .inv td { padding: 0.5em 0.3em; border-bottom: 1px solid #edf0f4; white-space: nowrap; }
.film .inv th.n, .film .inv td.n { text-align: right; }
.film .inv .tot { display: grid; gap: 0.3em; margin-top: 0.7em; justify-items: end; }
.film .inv .tot div { display: flex; gap: 1.5em; }
.film .inv .tot b { font-weight: 700; }
.film .pv { position: relative; display: inline-block; }
.film .pv.hot { background: #fde8e6; border-radius: 0.2em; box-shadow: 0 0 0 0.18em #f3c4c1; }
/* the visible prices pulse gently from the first moment, so the opening scene is alive at once */
.film.film-live .sc[data-s="0"].on .pv.hot { animation: film-hot 1.2s ease-in-out infinite; }
@keyframes film-hot { 0%, 100% { box-shadow: 0 0 0 0.18em #f3c4c1; } 50% { box-shadow: 0 0 0 0.36em #f3c4c1; } }
.film .mk.you { background: #0e1726; background-image: none; border-color: #0e1726; }
.film .mk { position: absolute; inset: -0.1em -0.3em; background: #fff; border: 0.08em solid #0e1726;
  background-image: linear-gradient(to top right, transparent calc(50% - 0.5px), #0e1726 50%, transparent calc(50% + 0.5px)),
                    linear-gradient(to bottom right, transparent calc(50% - 0.5px), #0e1726 50%, transparent calc(50% + 0.5px)); }

/* annotations: a short label that explains what the picture shows */
.film .note { margin-top: 1em; display: inline-flex; align-items: center; gap: 0.6em; font-size: 1.12em; font-weight: 650; line-height: 1.3; color: var(--ink-2);
  background: var(--bg-subtle); border: 1px solid var(--line-strong); border-radius: 0.7em; padding: 0.45em 1em; max-width: 92%; text-align: left; }
.film .note.warn { color: #8a1f17; background: #fdeceb; border-color: #f3c4c1; }
.film .note b { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 1.4em; height: 1.4em; border-radius: 50%; background: #b3261e; color: #fff; font-size: 0.95em; }

/* scene 1: drop a folder */
.film .drop { width: 74%; margin-top: 0.9em; border: 0.18em dashed var(--accent-line); background: var(--accent-bg); border-radius: 1em; padding: 1.4em 1em 1.2em; position: relative; }
.film .folder { display: inline-flex; align-items: center; gap: 0.8em; background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: 0.8em; padding: 0.6em 1.2em; font-weight: 650; font-size: 1.1em; box-shadow: 0 0.4em 1em rgba(14, 23, 38, 0.12);
  transform: translateY(-4.5em); opacity: 0; transition: transform 0.7s cubic-bezier(.2, .8, .3, 1), opacity 0.4s ease; }
.film .sc.on .folder { transform: none; opacity: 1; transition-delay: 0.3s; }
.film .folder svg { width: 1.8em; height: 1.8em; color: var(--accent); }
.film .folder em { font-style: normal; background: var(--btn); color: #fff; border-radius: 99px; padding: 0.05em 0.7em; font-size: 0.9em; }
.film .chips { display: flex; gap: 0.35em; justify-content: center; margin-top: 0.9em; flex-wrap: wrap; }
.film .chips i { width: 1.5em; height: 1.9em; background: var(--paper); border: 1px solid var(--paper-line); border-radius: 0.2em; opacity: 0; transform: scale(0.6); transition: opacity 0.25s ease, transform 0.25s ease; position: relative; }
.film .chips i::after { content: ""; position: absolute; left: 0.25em; right: 0.25em; top: 0.5em; height: 0.15em; background: var(--paper-line); box-shadow: 0 0.4em 0 var(--paper-line), 0 0.8em 0 var(--paper-line); }
.film .sc.on .chips i { opacity: 1; transform: none; }
.film .types { display: flex; gap: 0.5em; justify-content: center; margin-top: 0.9em; }
.film .types span { font-size: 0.85em; font-weight: 650; color: var(--accent-strong); background: var(--surface); border: 1px solid var(--accent-line); border-radius: 99px; padding: 0.1em 0.8em; }
.film .go { margin-top: 1.1em; display: inline-block; background: var(--btn); color: #fff; font-weight: 650; padding: 0.55em 1.4em; border-radius: 0.6em; transition: transform 0.15s ease; }
.film .go.press { transform: scale(0.94); filter: brightness(0.9); }

/* scene 2: CostShade reads every file */
.film .reads { width: 78%; text-align: left; padding-top: 0.6em; }
.film .rhead { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; }
.film .count { font-size: 1.25em; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--accent-strong); white-space: nowrap; }
.film .pbar { width: 100%; height: 0.8em; border-radius: 99px; background: var(--bg-subtle); border: 1px solid var(--line); overflow: hidden; margin: 0.6em 0 0.75em; }
.film .pbar i { display: block; height: 100%; width: 0; background: var(--btn); }
.film .flist { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.32em; }
.film .fr { display: grid; grid-template-columns: 3.2em minmax(0, 1fr) auto; align-items: center; gap: 0.9em; padding: 0.4em 0.9em; background: var(--surface-2, var(--surface)); border: 1px solid var(--line); border-radius: 0.55em;
  opacity: 0; transform: translateX(-1em); transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; }
.film .fr.on { opacity: 1; transform: none; }
.film .fr.scan { border-color: var(--btn); box-shadow: 0 0 0 0.16em color-mix(in srgb, var(--btn) 25%, transparent); }
.film .ft { font-size: 0.75em; font-weight: 750; letter-spacing: 0.06em; color: var(--muted); background: var(--bg-subtle); border-radius: 0.35em; padding: 0.15em 0; text-align: center; }
.film .fn { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.film .fs { font-size: 0.88em; font-weight: 650; border-radius: 99px; padding: 0.15em 0.9em; white-space: nowrap; opacity: 0; transform: scale(0.9); transition: opacity 0.3s ease, transform 0.3s ease; }
.film .fr.done .fs { opacity: 1; transform: none; }
.film .fr.yes .fs { background: var(--accent-bg); color: var(--accent-strong); border: 1px solid var(--accent-line); }
.film .fr.no .fs { background: var(--bg-subtle); color: var(--muted); border: 1px solid var(--line-strong); }
.film .fr-more { text-align: center; color: var(--muted); font-size: 0.95em; padding-top: 0.2em; opacity: 0; transition: opacity 0.4s ease; }
.film .fr-more.on { opacity: 1; }
.film .legend { margin-top: 0.6em; font-size: 1.02em; font-weight: 600; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 0.4em 1em; align-items: center; }
.film .legend .lg { display: inline-flex; align-items: center; justify-content: center; width: 1.4em; height: 1.4em; border-radius: 50%; color: #fff; font-weight: 800; font-size: 0.85em; }
.film .legend .lg.y { background: var(--btn); } .film .legend .lg.n { background: var(--faint); }

/* scene 3: results */
.film .story { display: flex; gap: 2.4em; align-items: flex-end; justify-content: center; margin-bottom: 1em; }
.film .story div { display: flex; flex-direction: column; align-items: center; }
.film .story strong { font-size: 3.4em; line-height: 1; font-weight: 800; letter-spacing: -0.04em; color: var(--accent-strong); font-variant-numeric: tabular-nums; }
.film .story .q strong { color: var(--muted); }
.film .story span { font-size: 1em; color: var(--ink-2); max-width: 14em; margin-top: 0.3em; }
.film .tiles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.6em; width: 78%; }
.film .tile { background: var(--paper); border: 1px solid var(--paper-line); border-radius: 0.35em; aspect-ratio: 3 / 3.1; position: relative; padding: 0.5em 0.45em;
  opacity: 0; transform: scale(0.85); transition: opacity 0.3s ease, transform 0.3s ease; }
.film .sc.on .tile, .film:not(.film-live):not(.film-ready) .tile { opacity: 1; transform: none; }
.film .tile::before { content: ""; position: absolute; left: 0.45em; right: 0.45em; top: 0.55em; height: 0.18em; background: var(--paper-line); box-shadow: 0 0.55em 0 var(--paper-line), 0 1.1em 0 var(--paper-line); }
.film .tile b { position: absolute; left: 0.45em; right: 0.45em; bottom: 0.9em; height: 0.8em; border: 0.08em solid #0e1726; background: #fff;
  background-image: linear-gradient(to top right, transparent calc(50% - 0.5px), #0e1726 50%, transparent calc(50% + 0.5px)), linear-gradient(to bottom right, transparent calc(50% - 0.5px), #0e1726 50%, transparent calc(50% + 0.5px)); }
.film .tile.none b { display: none; }
.film .tile u { position: absolute; right: -0.35em; top: -0.35em; width: 1.35em; height: 1.35em; border-radius: 50%; background: var(--btn); color: #fff; display: flex; align-items: center; justify-content: center; text-decoration: none; font-size: 0.8em; font-weight: 800; }
.film .tile.none u { background: var(--faint); }
.film .tiles-note { font-size: 1.08em; font-weight: 600; color: var(--ink-2); margin-top: 0.8em; }
.film .tiles-note .lg { display: inline-flex; align-items: center; justify-content: center; width: 1.3em; height: 1.3em; border-radius: 50%; color: #fff; font-weight: 800; font-size: 0.85em; vertical-align: 0.05em; }
.film .tiles-note .lg.y { background: var(--btn); } .film .tiles-note .lg.n { background: var(--faint); }

/* scene 4: before and after */
.film .ba { position: relative; width: 27em; max-width: 92%; }
.film .ba .inv { width: 100%; font-size: 0.72em; }
.film .ba .masked { position: absolute; inset: 0; clip-path: inset(0 0 0 calc(var(--cut, 100) * 1%)); }
.film .ba .line { position: absolute; top: -0.6em; bottom: -0.6em; left: calc(var(--cut, 100) * 1%); width: 0.22em; background: var(--btn); border-radius: 9px; box-shadow: 0 0 0 0.12em var(--paper); }
.film .ba .tag { position: absolute; top: -1.8em; font-size: 0.95em; font-weight: 700; color: var(--muted); }
.film .ba .tag.l { left: 0; } .film .ba .tag.r { right: 0; color: var(--accent-strong); }
.film .pills { margin-top: 1.4em; display: flex; flex-wrap: wrap; gap: 0.5em 0.7em; justify-content: center; max-width: 96%; }
.film .pill { display: inline-flex; align-items: center; gap: 0.5em; background: var(--accent-bg); border: 1px solid var(--accent-line); color: var(--accent-strong); font-weight: 650; font-size: 1.05em; padding: 0.4em 1em; border-radius: 99px; }
.film .pill svg { width: 1.25em; height: 1.25em; flex: 0 0 auto; }

/* scene 5: download */
.film .dl { display: inline-flex; align-items: center; gap: 0.6em; background: var(--btn); color: #fff; font-weight: 650; padding: 0.7em 1.6em; border-radius: 0.7em; font-size: 1.25em; transition: transform 0.15s ease; }
.film .dl svg { width: 1.2em; height: 1.2em; }
.film .dl.press { transform: scale(0.94); filter: brightness(0.9); }
.film .zipchip { margin-top: 1.4em; display: inline-flex; align-items: center; gap: 0.7em; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 0.7em; padding: 0.6em 1.1em;
  font-weight: 650; box-shadow: 0 0.4em 1em rgba(14, 23, 38, 0.12); opacity: 0; transform: translateY(-2em); transition: opacity 0.4s ease, transform 0.6s cubic-bezier(.2, .8, .3, 1); }
.film .zipchip.in { opacity: 1; transform: none; }
.film .zipchip svg { width: 1.5em; height: 1.5em; color: var(--accent); }
.film .zipchip small { color: var(--muted); font-weight: 500; }

/* scene 6: why it matters */
.film .benefits { list-style: none; margin: 1em 0 0; padding: 0; display: grid; gap: 0.6em; width: 82%; text-align: left; }
.film .benefits li { display: flex; align-items: center; gap: 0.9em; background: var(--accent-bg); border: 1px solid var(--accent-line); border-radius: 0.8em; padding: 0.6em 1.1em;
  opacity: 0; transform: translateX(-1.2em); transition: opacity 0.5s ease, transform 0.5s ease; }
.film .sc.on .benefits li { opacity: 1; transform: none; }
.film .sc.on .benefits li:nth-child(1) { transition-delay: 0.7s; } .film .sc.on .benefits li:nth-child(2) { transition-delay: 1.5s; }
.film .sc.on .benefits li:nth-child(3) { transition-delay: 2.3s; } .film .sc.on .benefits li:nth-child(4) { transition-delay: 3.1s; }
.film .benefits svg { flex: 0 0 auto; width: 2em; height: 2em; color: var(--accent-strong); }
.film .benefits strong { display: block; font-size: 1.28em; font-weight: 700; color: var(--ink); letter-spacing: -0.01em; }
.film .benefits small { display: block; font-size: 1.02em; color: var(--ink-2); margin-top: 0.1em; }

/* scene 7: end card */
.film .cta { display: inline-block; background: var(--btn); color: #fff; font-weight: 700; font-size: 1.5em; padding: 0.55em 1.6em; border-radius: 0.7em; margin-top: 0.9em;
  box-shadow: 0 0.5em 1.4em color-mix(in srgb, var(--btn) 45%, transparent); }
.film .sc.on .cta { animation: film-pulse 1.4s ease-in-out 0.6s infinite; }
@keyframes film-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

/* pointer */
.film .ptr { position: absolute; width: 1.7em; height: 2.3em; z-index: 7; pointer-events: none; opacity: 0; transition: opacity 0.3s ease, left 0.9s cubic-bezier(.4, 0, .2, 1), top 0.9s cubic-bezier(.4, 0, .2, 1); left: 70%; top: 80%; }
.film .ptr.show { opacity: 1; }

/* the caption strip: at the TOP of the screen, inside the frame, large text (sized in em from the screen's width,
   never smaller than ordinary 1rem body text, so it stays readable on a phone) */
.film .capin { flex: 0 0 auto; z-index: 4; background: var(--accent-bg); border-bottom: 1px solid var(--accent-line);
  padding: 0.7em 1.2em 0.6em; display: grid; gap: 0.5em; }
.film .capmain { display: flex; align-items: center; gap: 0.9em; min-height: 2.3em; }
.film .cap-tag { flex: 0 0 auto; font-size: max(0.78em, 0.8rem); font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: #fff; background: var(--btn);
  border-radius: 99px; padding: 0.3em 1em; white-space: nowrap; }
.film .cap-text { margin: 0; font-size: max(1.6em, 1.0625rem); font-weight: 750; line-height: 1.22; letter-spacing: -0.015em; color: var(--ink); }
.film .steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35em 0.6em; }
.film .steps li { display: inline-flex; align-items: center; gap: 0.5em; font-size: max(0.92em, 0.8rem); font-weight: 650; color: var(--muted); padding: 0.15em 0.8em 0.15em 0.2em; border-radius: 99px;
  border: 1px solid var(--line-strong); background: var(--surface); transition: all 0.3s ease; }
.film .steps .n { display: inline-flex; align-items: center; justify-content: center; width: 1.6em; height: 1.6em; border-radius: 50%; background: var(--bg-subtle); color: var(--muted);
  font-size: 0.92em; font-weight: 800; border: 1px solid var(--line-strong); }
.film .steps li.done { color: var(--accent-strong); border-color: var(--accent-line); }
.film .steps li.done .n { background: var(--accent-bg); color: var(--accent-strong); border-color: var(--accent-line); }
.film .steps li.now { color: #fff; background: var(--btn); border-color: var(--btn); }
.film .steps li.now .n { background: #fff; color: var(--btn); border-color: #fff; }
@media (max-width: 620px) {
  .film { aspect-ratio: 4 / 5.2; }
  .film .capin { padding: 0.8em 1em 0.7em; }
  .film .capmain { flex-direction: column; align-items: flex-start; gap: 0.45em; }
  .film .steps li .l { display: none; }
  .film .steps li { padding: 0.15em; }
  .film .sc { padding: 1em 0.8em; }
  .film .sc-row { flex-direction: column; gap: 0.8em; }
  .film .sc-row .inv-wrap { flex: 0 0 auto; }
}

/* controls under the film */
.film-ctl { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-3); flex-wrap: wrap; }
.film-note { font-size: var(--text-xs); color: var(--faint); }
.film-pause { font: inherit; font-size: var(--text-sm); color: var(--muted); background: none; border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 4px 12px; cursor: pointer; }
.film-pause:hover { color: var(--ink); border-color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .film .sc, .film .rise, .film .tile, .film .folder, .film .chips i, .film .fr, .film .fs, .film .benefits li, .film .pv.hot { transition: none !important; animation: none !important; }
}

/* /?film=MS freezes the film for checking: no transitions, so the frame is exactly that moment */
.film.film-seek *, .film.film-seek { transition: none !important; animation: none !important; }
