/* Drop demo: the home hero animation (website 63p, 2026-10-21). One 14s loop, CSS only.
   Scene A (0-58%): a folder is dragged onto the drop box, its files fly in, the box reads them.
   Scene B (58-95%): the filled Ledger. Every timeline below shares --dd-t so the scenes stay in step.
   prefers-reduced-motion: scene B only, static. No layout shift: the stage height is fixed. */
.im .drop-demo { --dd-t: 14s; --dd-fx: 39%; --dd-fy: 137%; margin: 0; width: 100%; max-width: 540px; justify-self: end; }
.im .dd-stage { position: relative; height: 470px; }
.im .dd-stage *, .im .dd-stage *::before { box-sizing: border-box; }
.im .drop-demo figcaption {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 32px; margin-top: 14px; font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.45;
}
.im .dd-pause {
  flex: none; font: 500 var(--fs-xs)/1 var(--sans); color: var(--ink-2);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px;
  padding: 7px 14px; cursor: pointer;
}
.im .dd-pause:hover { border-color: var(--accent); color: var(--accent-ink); }
.im .dd-pause:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.im .drop-demo.is-paused .dd-stage *, .im .drop-demo.is-off .dd-stage * { animation-play-state: paused !important; }

/* ---- scene A ---- */
.im .dd-a { position: absolute; inset: 0; animation: dd-a var(--dd-t) infinite; }
.im .dd-box {
  position: absolute; left: 14%; top: 50%; width: 86%; height: 46%;
  display: grid; place-items: center; text-align: center;
  background: var(--surface); border: 2px dashed var(--line-2); border-radius: 14px;
  animation: dd-box var(--dd-t) infinite;
}
.im .dd-idle, .im .dd-read { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 20px; }
.im .dd-idle b, .im .dd-read b { font-size: var(--fs-base); font-weight: 600; color: var(--ink); }
.im .dd-idle span { font-size: var(--fs-xs); color: var(--ink-3); }
.im .dd-ico { color: var(--accent); margin-bottom: 4px; }
.im .dd-idle { animation: dd-idle var(--dd-t) infinite; }
.im .dd-read { opacity: 0; width: 100%; max-width: 280px; gap: 12px; animation: dd-read var(--dd-t) infinite; }
.im .dd-prog { display: block; width: 100%; height: 6px; border-radius: 3px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); overflow: hidden; }
.im .dd-prog i { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); animation: dd-prog var(--dd-t) infinite; }

.im .dd-folder {
  position: absolute; left: 0; top: 2%; width: 64%; height: 38%;
  transform-origin: 50% 50%;
  animation: dd-folder var(--dd-t) infinite;
}
.im .dd-fbody {
  position: absolute; inset: 0; padding: 14px 16px;
  background: var(--amber-wash); border: 1px solid var(--amber-line); border-radius: 4px 12px 12px 12px;
  box-shadow: 0 1px 2px rgba(16, 26, 28, .05), 0 22px 40px -26px rgba(16, 26, 28, .35);
  animation: dd-fbody var(--dd-t) infinite;
}
.im .dd-fbody::before {
  content: ""; position: absolute; left: -1px; top: -12px; width: 42%; height: 13px;
  background: var(--amber-wash); border: 1px solid var(--amber-line); border-bottom: 0; border-radius: 8px 8px 0 0;
}
.im .dd-fname { display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs); font-weight: 600; color: var(--amber-ink); }
.im .dd-chips {
  position: absolute; left: 16px; right: 16px; top: 46px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.im .dd-chip {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  font-size: var(--fs-xs); line-height: 1; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 6px; padding: 7px 9px;
  animation: dd-chip var(--dd-t) infinite both;
}
.im .dd-chip::before { content: ""; width: 8px; height: 10px; border-radius: 2px; background: var(--red); flex: none; }
.im .dd-chip.t-img::before { background: var(--accent); }
.im .dd-chip.t-zip::before { background: var(--amber); }
.im .dd-chip:nth-child(2) { animation-delay: .07s; }
.im .dd-chip:nth-child(3) { animation-delay: .14s; }
.im .dd-chip:nth-child(4) { animation-delay: .21s; }
.im .dd-chip:nth-child(5) { animation-delay: .28s; }
.im .dd-chip:nth-child(6) { animation-delay: .35s; }
.im .dd-cursor { position: absolute; right: 10%; bottom: -14px; animation: dd-cursor var(--dd-t) infinite; }

/* ---- scene B: the filled Ledger ---- */
.im .dd-ledger {
  position: absolute; inset: 0; padding: 6px 20px 0;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(16, 26, 28, .05), 0 28px 56px -32px rgba(16, 26, 28, .30);
  opacity: 0; animation: dd-ledger var(--dd-t) infinite;
}
.im .dd-lh { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0 10px; border-bottom: 1px solid var(--line); }
.im .dd-lt { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.im .dd-who { font-size: var(--fs-xs); color: var(--ink-2); }
.im .dd-sec { font-size: var(--fs-xs); font-weight: 600; color: var(--ink-3); margin: 12px 0 2px; }
.im .dd-row {
  display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line);
  animation: dd-row var(--dd-t) infinite both;
}
.im .dd-st {
  flex: none; width: 34px; height: 26px; display: grid; place-items: center;
  font-size: var(--fs-xs); font-weight: 600; color: var(--accent-ink); background: var(--accent-wash); border-radius: 6px;
}
.im .dd-rn { flex: 1; min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: var(--fs-xs); font-weight: 500; color: var(--ink); }
.im .dd-rn small { font-size: var(--fs-xs); font-weight: 400; color: var(--ink-3); white-space: nowrap; }
.im .dd-pill { flex: none; width: 84px; text-align: center; font-size: var(--fs-xs); line-height: 1; padding: 5px 0; border-radius: 999px; }
.im .dd-pill.ok { color: var(--teal-ink); background: var(--teal-wash); }
.im .dd-pill.due { color: var(--amber-ink); background: var(--amber-wash); }
.im .dd-cme { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 0; }
.im .dd-cl { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--ink-2); }
.im .dd-cl b { font-weight: 600; color: var(--ink); }
.im .dd-bar { display: block; height: 6px; border-radius: 3px; background: var(--accent-wash); overflow: hidden; }
.im .dd-bar i { display: block; height: 100%; width: 91.7%; background: var(--accent); }
.im .dd-creds { gap: 10px; border-bottom: 0; }
.im .dd-creds span {
  flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 8px 10px;
  font-size: var(--fs-xs); color: var(--ink-3); background: var(--paper); border: 1px solid var(--line); border-radius: 8px;
}
.im .dd-creds b { font-weight: 600; color: var(--ink); }
.im .dd-foot { border-bottom: 0; padding: 8px 0 0; font-size: var(--fs-xs); color: var(--ink-2); }
.im .dd-foot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--signal-good); flex: none; }
/* Rows are children 3 to 10 of the card (header 1, section labels 2 and 8). */
.im .dd-row:nth-child(4) { animation-delay: .1s; }
.im .dd-row:nth-child(5) { animation-delay: .2s; }
.im .dd-row:nth-child(6) { animation-delay: .3s; }
.im .dd-row:nth-child(7) { animation-delay: .45s; }
.im .dd-row:nth-child(9) { animation-delay: .6s; }
.im .dd-row:nth-child(10) { animation-delay: .8s; }

/* ---- the timeline (percent of --dd-t) ---- */
@keyframes dd-a { 0% { opacity: 0; } 3%, 56% { opacity: 1; } 60%, 100% { opacity: 0; } }
@keyframes dd-folder {
  0%, 7% { transform: none; }
  25%, 100% { transform: translate(var(--dd-fx), var(--dd-fy)) scale(.8) rotate(-2deg); }
}
@keyframes dd-fbody { 0%, 29% { opacity: 1; } 36%, 100% { opacity: 0; } }
@keyframes dd-chip {
  0%, 28% { transform: none; opacity: 1; }
  35%, 100% { transform: translateY(60px) scale(.3); opacity: 0; }
}
@keyframes dd-cursor { 0%, 3% { opacity: 0; } 6%, 29% { opacity: 1; } 33%, 100% { opacity: 0; } }
@keyframes dd-box {
  0%, 15% { border-color: var(--line-2); background: var(--surface); }
  21%, 56% { border-color: var(--accent); background: var(--accent-wash); }
  60%, 100% { border-color: var(--line-2); background: var(--surface); }
}
@keyframes dd-idle { 0%, 17% { opacity: 1; } 21%, 100% { opacity: 0; } }
@keyframes dd-read { 0%, 34% { opacity: 0; } 37%, 100% { opacity: 1; } }
@keyframes dd-prog { 0%, 37% { transform: scaleX(0); } 54%, 100% { transform: scaleX(1); } }
@keyframes dd-ledger {
  0%, 56% { opacity: 0; transform: translateY(14px); }
  61%, 94% { opacity: 1; transform: none; }
  98%, 100% { opacity: 0; transform: none; }
}
@keyframes dd-row { 0%, 59% { opacity: 0; transform: translateY(6px); } 63%, 100% { opacity: 1; transform: none; } }

/* Phone: the demo sits right under the headline (the hero copy's children join the grid). */
@media (max-width: 900px) {
  .im.home .hero-split { gap: 0; }
  .im.home .hero-copy { display: contents; }
  .im.home .hero-split h1 { order: -2; }
  .im .drop-demo { order: -1; justify-self: stretch; max-width: none; margin: 28px 0 8px; }
}
@media (max-width: 480px) {
  /* folder centre (42%, 20%) to box centre (54%, 71%), in folder units */
  .im .drop-demo { --dd-fx: 14%; --dd-fy: 142%; }
  .im .dd-stage { height: 480px; }
  .im .dd-folder { width: 84%; height: 36%; }
  .im .dd-box { left: 8%; top: 46%; width: 92%; height: 50%; }
  .im .dd-chips { gap: 6px; left: 14px; right: 14px; }
  .im .dd-chip { padding: 6px 8px; gap: 6px; }
  .im .dd-ledger { padding: 2px 14px 0; }
  .im .dd-sec { margin-top: 8px; }
  .im .dd-row { padding: 5px 0; }
  .im .dd-rn { flex-direction: column; gap: 0; line-height: 1.3; }
  .im .dd-cme { padding: 8px 0; }
  .im .dd-pill { width: 76px; }
  .im .dd-creds { gap: 6px; }
  .im .dd-creds span { padding: 7px 8px; }
}

/* Reduced motion: the finished Ledger, still. */
@media (prefers-reduced-motion: reduce) {
  .im .dd-a, .im .dd-pause { display: none; }
  .im .dd-ledger, .im .dd-row { animation: none; opacity: 1; transform: none; }
}
