/* home.css -- the parts added to the landing page: the client belt, the 30 second story and the FAQ.
   Colours, type, radii and shadows come from the tokens in site.css, so both themes follow the rest of the page. */
.story-sec { --ease: cubic-bezier(0.22, 1, 0.36, 1); }
.clients, .story-sec, #faq { --ease: cubic-bezier(0.22, 1, 0.36, 1); }
.story button { font: inherit; color: inherit; cursor: pointer; }
.story small { font-size: var(--fs-xs); line-height: 1.5; color: var(--text-muted); }
.i-lg { width: 32px; height: 32px; }
.i-xl { width: 48px; height: 48px; stroke-width: 1.5; }

/* ---------- story ---------- */
.story { padding: var(--s-4); }
.story-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 8px 16px; }
.play-btn { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border: 0; border-radius: 9999px; background: var(--cta); color: var(--on-cta); }
.play-btn .i { grid-area: 1 / 1; }
.play-btn .p-play, .user-paused .play-btn .p-pause { opacity: 0; }
.user-paused .play-btn .p-play { opacity: 1; }
.story-body { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 16px; }
.steps { display: grid; gap: 8px; align-content: stretch; }
.step-btn { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center; width: 100%; height: 100%; text-align: start; padding: 12px; border: 1px solid transparent; border-radius: 16px; background: transparent; transition: opacity .3s var(--ease), transform .5s var(--ease); }
.step-btn:hover { background: var(--surface-2); }
.step-btn.on { background: var(--surface-2); border-color: var(--border-soft); }
.step-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border-soft); color: var(--text-muted); }
.on .step-ico, .past .step-ico { background: var(--cta); border-color: var(--cta); color: var(--on-cta); }
.step-txt { display: grid; }
.step-txt b { font-weight: 600; }
.step-bar { grid-column: 1 / -1; height: 4px; border-radius: 9999px; background: var(--border-soft); overflow: hidden; opacity: 0; }
.on .step-bar { opacity: 1; }
.step-bar i { display: block; height: 100%; background: var(--brand-text); transform: scaleX(0); transform-origin: left; }
html[dir="rtl"] .step-bar i { transform-origin: right; }
.live .on .step-bar i { animation: bar 5s linear forwards; }
.paused .step-bar i, .paused .st-scene * { animation-play-state: paused !important; }
@keyframes bar { to { transform: scaleX(1); } }
.canvas { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 440px; border-radius: 16px; background: var(--surface-2); overflow: hidden; }
.st-scene { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; justify-items: center; gap: 24px; padding: 24px; }
.live .st-scene { grid-area: 1 / 1; visibility: hidden; }
.live .st-scene.on { visibility: visible; }
.live .st-scene.on .pop { animation: pop .8s var(--ease) backwards; }
.live .st-scene.on .d2 { animation-delay: .5s; } .live .st-scene.on .d3 { animation-delay: 1s; } .live .st-scene.on .d4 { animation-delay: 1.5s; } .live .st-scene.on .d5 { animation-delay: 2.2s; }
@keyframes pop { from { opacity: 0; transform: translateY(24px) scale(.96); } }
.br, .conn { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.conn { gap: 4px; }
.sc-grid { display: flex; justify-content: center; align-items: center; gap: 24px; width: 100%; }
.device, .handset { display: grid; justify-items: center; align-content: center; gap: 12px; flex: 0 1 176px; min-width: 0; height: 264px; text-align: center; padding: 16px; border-radius: 24px; background: var(--surface); box-shadow: var(--sh-2); }
.handset { border: 8px solid #0b3273; }
.screen { font-size: 1.875rem; font-weight: 700; }
.finger { position: relative; display: grid; place-items: center; width: 96px; height: 96px; border-radius: 9999px; background: var(--cta); color: var(--on-cta); }
.finger i, .map .ring { position: absolute; inset: 0; border-radius: 9999px; border: 2px solid var(--brand-text); opacity: 0; }
.live .on .finger i, .live .on .map .ring { animation: ripple 2.4s var(--ease) infinite; }
.live .on .finger i + i { animation-delay: 1.2s; }
@keyframes ripple { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(1.6); } }
.map { position: relative; display: grid; place-items: center; width: 96px; height: 96px; border-radius: 9999px; background: var(--surface-2); color: var(--brand-text); }
.fake-btn { width: 100%; text-align: center; padding: 8px; border-radius: 8px; background: var(--cta); color: var(--on-cta); font-size: .875rem; font-weight: 600; }
.or-pill { padding: 4px 12px; border-radius: 9999px; background: var(--signal); color: var(--signal-ink); font-weight: 700; }
.st-toast { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 9999px; background: var(--ok-weak); color: var(--ok); font-weight: 600; font-size: .875rem; }
.panel { width: min(440px, 100%); background: var(--surface); border-radius: 16px; padding: 16px; box-shadow: var(--sh-2); }
.panel-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-block-end: 12px; }
.lines { display: grid; gap: 8px; }
.line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 8px; background: var(--surface-2); }
.line.ok { background: var(--ok-weak); color: var(--ok); }
.line.warn { background: var(--warn-weak); color: var(--warn); }
.line.total { background: var(--navy); color: var(--on-navy); font-size: 1.25rem; }
.track { display: flex; gap: 4px; height: 16px; margin-block-end: 12px; }
.seg { display: block; border-radius: 4px; transform-origin: left; }
html[dir="rtl"] .seg { transform-origin: right; }
.seg-late { flex: 1; background: var(--signal); } .seg-work { flex: 8; background: var(--cta); } .seg-over { flex: 2; background: var(--ok); }
.live .on .seg { animation: grow 1s var(--ease) .4s backwards; } .live .on .seg-work { animation-delay: .8s; } .live .on .seg-over { animation-delay: 1.5s; }
@keyframes grow { from { transform: scaleX(0); } }
.stack { display: grid; gap: 12px; width: min(480px, 100%); }
.req, .notif { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: var(--surface); box-shadow: var(--sh-2); }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 9999px; background: var(--surface-2); color: var(--brand-text); }
.req-txt { display: grid; flex: 1; min-width: 0; text-align: start; }
.st-pill { display: inline-block; padding: 4px 12px; border-radius: 9999px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.st-pill.ok { background: var(--ok-weak); color: var(--ok); } .st-pill.wait { background: var(--warn-weak); color: var(--warn); } .st-pill.info { background: var(--surface-2); color: var(--brand-text); }
.stamp-wrap { display: grid; justify-items: end; }
.stamp-wrap .st-pill { grid-area: 1 / 1; }
.stamp-wrap .wait { opacity: 0; }
.live .on .stamp-wrap .wait { animation: waitout 5s var(--ease) both; }
.live .on .stamp-wrap .ok { animation: okin 5s var(--ease) both; }
.live .on .req:nth-child(2) .st-pill { animation-delay: .7s; } .live .on .req:nth-child(3) .st-pill { animation-delay: 1.4s; }
@keyframes waitout { 0%, 34% { opacity: 1; } 38%, 100% { opacity: 0; } }
@keyframes okin { 0%, 38% { opacity: 0; transform: scale(1.3); } 44%, 100% { opacity: 1; transform: none; } }
.done { display: grid; justify-items: center; gap: 12px; font-size: 1.25rem; }
.seal { display: grid; place-items: center; width: 112px; height: 112px; border-radius: 9999px; background: var(--ok); color: var(--surface); box-shadow: 0 0 0 16px var(--ok-weak); }
.notif { width: min(400px, 100%); }
.notif img { border-radius: 8px; }

/* ---------- client belt: two identical lists side by side; moving by one list width loops without a seam ---------- */
.belts { display: grid; gap: 16px; }
.belt { display: flex; direction: ltr; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.belt ul { display: flex; flex: none; gap: 16px; padding-block: 4px; padding-inline-end: 16px; animation: belt 60s linear infinite; }
.logo { display: flex; align-items: center; justify-content: center; gap: 12px; width: 216px; height: 96px; padding: 12px 16px; border-radius: var(--r-md); border: 1px solid var(--border-soft); background: #fff; box-shadow: var(--sh-1); color: #0b1f3a; font-weight: 700; font-size: .875rem; line-height: 1.4; text-align: center; }
html[dir="rtl"] .logo { direction: rtl; }
.logo img { display: block; max-width: 100%; max-height: 68px; width: auto; height: auto; object-fit: contain; }
.logo.solid img { border-radius: 8px; }
.logo.named img { max-width: 56px; max-height: 56px; flex: none; }
/* one list of 68 marks: 7.5 seconds a mark, the speed the owner chose with fewer of them */
.belt.to-end ul { animation-direction: reverse; animation-duration: 510s; }
.clients .wrap { display: grid; justify-items: center; gap: 24px; text-align: center; margin-block-end: 24px; }
.clients h2 { max-width: 22em; text-wrap: balance; font-size: clamp(1.5rem, 2vw + 1rem, 2.1rem); }
.spot { width: min(100%, 560px); height: 300px; border-radius: var(--r-lg); border: 1px solid var(--border-soft); background: #fff; box-shadow: var(--sh-2); overflow: hidden; }
.spot ul { position: relative; height: 100%; }
.spot li { position: absolute; inset: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; align-items: center; gap: 12px; padding: 24px; color: #0b1f3a; font-size: var(--fs-lg); line-height: 1.4; opacity: 0; transition: opacity .4s ease; }
.spot li.on { opacity: 1; }
/* only the mark on show, the one leaving and the one coming are laid out, so the other pictures are not downloaded yet */
.spot li:not(.on, .was, .next) { content-visibility: hidden; }
.spot img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.join .wrap { display: grid; gap: 24px; }
.join-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.join-steps li { display: grid; justify-items: start; align-content: start; gap: 8px; padding: 24px; }
.join-steps .num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9999px; background: var(--cta); color: var(--on-cta); font-weight: 700; }
.join-steps h3 { font-size: var(--fs-lg); line-height: 1.4; }
.join-steps p { color: var(--text-soft); }
.join-cta { justify-content: center; }
@media (max-width: 799px) { .join-steps { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 559px) { .join-cta .btn-lg { white-space: normal; text-align: center; max-width: none; font-size: var(--fs-md); } }
@media (max-width: 559px) { .spot { height: 232px; } .spot li { padding: 16px; font-size: var(--fs-md); } }
@keyframes belt { to { transform: translateX(-100%); } }

.qa { background: var(--surface); border: 1px solid var(--border-soft); border-radius: 16px; margin-block-end: 12px; }
.qa summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px; font-weight: 600; cursor: pointer; list-style: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa p { padding: 0 16px 16px; color: var(--text-soft); }
.plus { position: relative; width: 16px; height: 16px; flex: none; }
.plus::before, .plus::after { content: ''; position: absolute; inset-inline: 0; top: 7px; height: 2px; background: var(--brand-text); transition: transform .5s var(--ease); }
.plus::after { transform: rotate(90deg); }
.qa[open] .plus::after { transform: rotate(0); }

.faq-wrap { max-width: 760px; }
.qa p { margin: 0; }

@media (max-width: 1023px) {
  .story-body { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
  .step-btn { grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 8px 2px; }
  .step-txt b { font-size: .75rem; }
  .step-txt small { display: none; }
  .step-bar { grid-column: 1; width: 100%; }
}
@media (max-width: 399px) {
  .line { flex-wrap: wrap; gap: 2px 4px; padding-inline: 8px; }
  .br, .conn { font-size: .875rem; gap: 4px; }
}
@media (max-width: 479px) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 719px) {
  .story { padding: 8px; }
  .canvas { min-height: 400px; }
  .st-scene { padding: 12px; }
  .sc-grid { gap: 8px; }
  .device, .handset { flex-basis: 136px; height: 232px; padding: 8px; }
  .st-toast { border-radius: 12px; }
  .logo { width: 168px; height: 80px; padding: 8px 12px; }
  .logo img { max-height: 56px; }
  .logo.named img { max-width: 40px; max-height: 40px; }
}
@media (max-width: 399px) {
  .sc-grid { gap: 4px; }
  .device, .handset { flex-basis: 112px; height: 216px; padding: 8px 4px; gap: 8px; font-size: .75rem; }
  .finger, .map { width: 72px; height: 72px; }
  .or-pill { padding: 2px 8px; font-size: .75rem; }
  .st-toast { font-size: .8125rem; }
}

/* a figure never breaks from its sign */
.st-scene .line b .latin { white-space: nowrap; }
html:not(.js) .play-btn { display: none; }
@media (prefers-reduced-motion: reduce) {
  .story *, .belt * { animation: none !important; }
  .stamp-wrap .wait { opacity: 0; }
  /* the belt stands still and is scrolled by hand: 68 marks wrapped on a phone would be thousands of pixels tall */
  .belt { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .belt ul { margin-inline: auto; padding-inline: 16px; }
  .belt ul[aria-hidden] { display: none; }
}
@media print {
  .belt { overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .belt ul { flex: 0 1 auto; flex-wrap: wrap; animation: none; }
  .belt ul[aria-hidden], .play-btn { display: none; }
}

.story.card:hover { translate: none; }
.story .play-btn { color: var(--on-cta); }
.story .play-btn .i { stroke-width: 2.5; }
