/* The home page and the journey pages: the product shown, not described.
   Built from the tokens in sellly.css and the type in site.css; nothing here
   introduces a colour except the WhatsApp-like chat, which depicts WhatsApp.
   Motion only ever shows something change, and stops for prefers-reduced-motion.
   The chats are drawn by public/site.js. */

/* ── 1 Hero ──────────────────────────────────────────────────────────────── */
.hero { padding-top: clamp(32px, 5.5vw, 80px); padding-bottom: 0; }
.hero-copy { max-width: 880px; }
.hero .lead { margin: var(--s-6) 0 0; max-width: 33em; }
.hero-art { margin: clamp(40px, 5vw, 64px) 0 0; min-width: 0; }
.hero-player { --stage-h: 540px; }
.hero-player .p-stage { grid-template-columns: minmax(0, 330px) minmax(0, 1fr); }
.hero-art figcaption, .j-art figcaption { margin-top: var(--s-3); color: var(--faint); font: var(--t-caption); }

/* ── The chat and the business's screen ──────────────────────────────────── */
.player { --stage-h: 520px; overflow: hidden; border: 1px solid var(--rule-strong); border-radius: 12px; background: var(--sheet); box-shadow: 0 1px 2px rgba(22, 25, 43, .04), 0 28px 56px -36px rgba(22, 25, 43, .28); }
.p-stage { display: grid; grid-template-columns: minmax(0, 290px) minmax(0, 1fr); }
.p-view { display: none; }

.phone { display: flex; flex-direction: column; height: var(--stage-h); min-width: 0; background: #efe7de; }
.phone-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff; border-bottom: 1px solid var(--rule); }
.phone-head b { display: block; font: 600 14px/1.2 var(--sans); }
.phone-head small { display: block; color: var(--muted); font: 400 12px/1.3 var(--sans); }
.avatar { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--paper); font: 600 15px/1 var(--sans); }
/* column-reverse keeps the newest message in view without a script */
.phone-body { flex: 1; min-height: 0; display: flex; flex-direction: column-reverse; overflow-y: auto; scrollbar-width: thin; }
.log { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 12px; }
.b { margin: 0; max-width: 88%; padding: 7px 10px; border-radius: 8px; background: #fff; box-shadow: 0 1px 1px rgba(0, 0, 0, .06); font: 400 13.5px/1.4 var(--sans); align-self: flex-start; overflow-wrap: anywhere; }
.b.out { align-self: flex-end; background: #dcf7c5; }
.b .b-card { display: block; margin-top: 6px; padding: 8px 9px; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); }
.b-card > b { display: block; margin-bottom: 4px; font: 600 13px/1.3 var(--sans); }
.b-row { display: flex; justify-content: space-between; gap: 12px; font: 400 12.5px/1.5 var(--sans); color: var(--ink-2); }
.b-row > span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.b-row.total { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--rule); font-weight: 600; color: var(--ink); }
.b.media { padding: 6px 8px; }
.tile { display: inline-flex; align-items: center; gap: 8px; }
.tile i { font-style: normal; }
/* What Sellly did: the journey it started. A tally mark and a line. */
.note { align-self: center; display: inline-flex; align-items: center; gap: 7px; margin: 2px 0; padding: 4px 9px 4px 7px; border: 1px solid var(--rule-strong); border-radius: var(--r-xs); background: var(--sheet); color: var(--ink-2); font: 600 12px/1.3 var(--sans); }
.note i { width: 2px; height: 12px; background: var(--red); }
.choices { display: flex; flex-wrap: wrap; gap: 6px; align-self: stretch; }
.c { padding: 8px 12px; border-radius: 8px; background: #fff; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); color: #0a6c8f; font: 600 13px/1.25 var(--sans); text-align: center; transition: transform var(--fast), background var(--fast); }
.c:not(.go) { color: var(--muted); font-weight: 500; }
.c.tapped { transform: scale(.96); background: var(--wash); }
.c svg { margin-left: 8px; }
.choices.typed { flex-direction: column; }
.choices.typed .c { display: flex; align-items: center; justify-content: space-between; text-align: left; color: var(--ink); font-weight: 500; }
.choices.again .c { color: #0a6c8f; font-weight: 600; }
.typing { display: inline-flex; gap: 4px; padding: 10px 12px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: dot 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .35; } 30% { opacity: 1; } }
.new { animation: rise var(--base) var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.tag { font: 600 11.5px/1 var(--sans); padding: 4px 6px; border-radius: var(--r-xs); background: var(--neutral-bg); color: var(--neutral); white-space: nowrap; }

/* The business's own screen: Sellly's app, as that business sees it */
.merchant { display: flex; flex-direction: column; height: var(--stage-h); min-width: 0; background: var(--sheet); border-left: 1px solid var(--rule); overflow: hidden; }
.m-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: 10px 14px; border-bottom: 1px solid var(--rule); }
.m-head b { font: 500 19px/1.1 var(--serif); }
.m-menu { display: flex; gap: var(--s-3); padding: 0 14px; border-bottom: 1px solid var(--rule); overflow-x: auto; white-space: nowrap; scrollbar-width: none; color: var(--muted); font: 600 12.5px/1 var(--sans); -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent); }
.m-menu::-webkit-scrollbar { display: none; }
.m-menu span { padding: 11px 0; margin-bottom: -1px; }
.m-menu .on { color: var(--ink); box-shadow: inset 0 -2px var(--ink); }
.m-body { flex: 1; min-height: 0; padding: 10px 14px 12px; overflow-y: auto; scrollbar-width: thin; }
.m-body .m-title { margin: 0 0 8px; font: 500 20px/1.1 var(--serif); }
.m-body .m-sub { margin: 10px 0 2px; color: var(--muted); font: var(--t-h4); }
.m-stats { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2); margin: 0 0 10px; padding-top: 10px; border-top: 1px solid var(--rule); }
.m-stats::before { content: ""; position: absolute; left: 0; top: -1px; width: 32px; height: 2px; background: var(--red); }
.m-stats dt { color: var(--muted); font: 500 11.5px/1.3 var(--sans); }
.m-stats dd { margin: 0; font: 600 20px/1.25 var(--sans); font-variant-numeric: tabular-nums; }
.m-stats .chg dd::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--info-solid); vertical-align: middle; }
.m-needs { display: flex; align-items: center; gap: 10px; margin: 0 0 4px; padding: 8px 10px; border: 1px solid var(--warning-line); border-radius: var(--r-sm); background: var(--warning-bg); color: var(--ink-2); font: 500 13px/1.3 var(--sans); }
.m-list { list-style: none; margin: 0; padding: 0; }
.m-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l1 st" "l2 pay"; column-gap: 10px; row-gap: 2px; align-items: center; padding: 8px 6px; margin: 0 -6px; border-top: 1px solid var(--rule); }
.m-row.fresh { background: var(--wash); animation: rise var(--base) var(--ease) both; }
.m-l1 { grid-area: l1; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; min-width: 0; }
.m-l1 b { flex: none; max-width: 100%; overflow: hidden; font: 600 13.5px/1.3 var(--sans); white-space: nowrap; text-overflow: ellipsis; }
.m-meta { color: var(--muted); font: 500 12px/1.3 var(--sans); font-variant-numeric: tabular-nums; }
.m-l2 { grid-area: l2; min-width: 0; overflow: hidden; color: var(--muted); font: 400 12px/1.4 var(--sans); white-space: nowrap; text-overflow: ellipsis; }
.m-row > .stage { grid-area: st; justify-self: end; font-size: 12.5px; }
.m-row > .pay { grid-area: pay; justify-self: end; }
.m-record { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--r-sm); background: var(--wash); color: var(--ink-2); font: 400 13px/1.45 var(--sans); animation: rise var(--base) var(--ease) both; }
.m-record b { display: block; margin-bottom: 2px; color: var(--ink); font: 600 12.5px/1.3 var(--sans); }
.m-act { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--wash); }
.m-act > span { color: var(--muted); font: 600 13px/1.3 var(--sans); }
.m-act .go { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.m-act .tapped { transform: scale(.97); }

/* Phones: one side at a time, and the script flips to the side that's acting */
@media (max-width: 760px) {
  .player { --stage-h: 470px; }
  .p-view { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 var(--s-4); border-bottom: 1px solid var(--rule); }
  .p-view button { min-height: 44px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font: 600 13.5px/1 var(--sans); cursor: pointer; }
  .p-view [aria-pressed="true"] { color: var(--ink); border-bottom-color: var(--ink); }
  .p-stage { grid-template-columns: minmax(0, 1fr); }
  .merchant { border-left: 0; }
  .player[data-view="business"] .phone { display: none; }
  .player:not([data-view="business"]) .merchant { display: none; }
}

/* ── 2 The problem: one journey, in pieces ───────────────────────────────── */
.scatter { list-style: none; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-6); margin: 0; padding: 0; }
.scatter li { display: flex; flex-direction: column; gap: 6px; padding-top: var(--s-4); border-top: 2px dashed var(--rule-strong); }
.scatter li:nth-child(even) { margin-top: 36px; }
.scatter li:nth-child(3n) { margin-top: 14px; }
.scatter small { color: var(--muted); font: 500 13.5px/1.3 var(--sans); }
.scatter b { font: 500 clamp(20px, 1.9vw, 24px)/1.2 var(--serif); }
.cost { max-width: 26em; margin: clamp(48px, 6vw, 80px) 0 0; font: 500 clamp(24px, 2.6vw, 34px)/1.25 var(--serif); letter-spacing: -.01em; }
.cost span { color: var(--muted); }
@media (max-width: 900px) {
  .scatter { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-8) var(--s-6); }
  .scatter li:nth-child(n) { margin-top: 0; }
  .scatter li:nth-child(even) { transform: translateY(16px); }
}

/* ── 3 Five journeys, one phone ──────────────────────────────────────────── */
.j-tabs, .s-tabs { display: flex; gap: var(--s-8); border-bottom: 1px solid var(--rule); overflow-x: auto; scrollbar-width: none; }
.j-tabs::-webkit-scrollbar, .s-tabs::-webkit-scrollbar { display: none; }
.j-tabs button, .s-tabs button { flex: none; min-height: 44px; padding: 0 0 14px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--muted); text-align: left; cursor: pointer; transition: color var(--fast), border-color var(--fast); }
.j-tabs button:hover, .s-tabs button:hover { color: var(--ink); }
.j-tabs b { display: block; font: 500 clamp(24px, 2.6vw, 32px)/1.1 var(--serif); }
.j-tabs small { display: block; margin-top: 4px; font: 500 13px/1.3 var(--sans); }
.s-tabs button { font: 600 15.5px/1 var(--sans); }
.j-tabs [aria-selected="true"], .s-tabs [aria-selected="true"] { color: var(--ink); border-bottom-color: var(--red); }
.j-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: clamp(40px, 7vw, 112px); align-items: start; padding-top: clamp(40px, 5vw, 64px); }
.j-panel h3 { font: var(--site-h3); letter-spacing: -.01em; }
.j-panel > p { max-width: 32em; margin: var(--s-5) 0 0; color: var(--ink-2); font: var(--site-lead); }
.j-panel .j-who { margin-top: var(--s-4); color: var(--muted); font: var(--site-body); }
.j-who span { color: var(--ink); font-weight: 600; }
.j-panel .arrow-link { margin-top: var(--s-4); }
.j-steps { display: flex; flex-wrap: wrap; gap: 6px 0; margin: var(--s-5) 0 0; padding: 0; list-style: none; font: 600 15px/1.4 var(--sans); }
.j-steps li { display: inline-flex; align-items: center; }
.j-steps li + li::before { content: "→"; margin: 0 10px; color: var(--faint); font-weight: 400; }
.j-art { margin: 0; }
.j-player { --stage-h: 540px; }
.j-player .phone { height: var(--stage-h); }
@media (max-width: 860px) {
  .j-tabs, .s-tabs { gap: var(--s-6); margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
  .j-body { grid-template-columns: minmax(0, 1fr); }
  .j-art { max-width: 380px; }
  .j-player { --stage-h: 480px; }
}

/* ── 4 One system behind them: the one dark band ─────────────────────────── */
.platform { margin-top: var(--section-y); padding-bottom: var(--section-y); color: var(--paper); border-image: conic-gradient(var(--ink) 0 0) fill 0 / / 0 100vmax; }
.platform h2, .platform h3 { color: var(--paper); }
.platform .part-head { border-top-color: rgba(250, 248, 243, .16); }
.platform .part-head::before { background: var(--red-on-ink); }
.platform .part-head .lead { color: rgba(250, 248, 243, .74); }
.flow { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--s-6); }
.lane-h { margin: 0; padding-bottom: var(--s-3); border-bottom: 2px solid rgba(250, 248, 243, .24); color: rgba(250, 248, 243, .74); font: 600 14px/1.3 var(--sans); }
.on-sellly .lane-h { border-bottom-color: var(--red-on-ink); color: var(--paper); }
.lane ol { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--s-6); margin: 0; padding: var(--s-6) 0 0; list-style: none; }
.lane li { display: flex; flex-direction: column; gap: 6px; }
.lane li i { color: rgba(250, 248, 243, .5); font: 500 28px/1 var(--serif); font-style: normal; }
.on-sellly li i { color: var(--red-on-ink); }
.lane li b { margin-top: var(--s-2); font: 500 clamp(21px, 2vw, 26px)/1.15 var(--serif); }
.lane li span { color: rgba(250, 248, 243, .74); font: 400 15px/1.55 var(--sans); }
@media (max-width: 860px) {
  .flow { grid-template-columns: minmax(0, 1fr); gap: var(--s-10); }
  .lane ol { grid-auto-flow: row; gap: var(--s-6); }
  .lane li { display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: var(--s-3); }
  .lane li i { grid-row: span 2; }
  .lane li b { margin: 0; }
}

/* ── 5 The real app, one screen at a time ────────────────────────────────── */
.s-panel { padding-top: var(--s-8); }
.s-panel figure { margin: 0; }
.s-panel figcaption { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-2) var(--s-8); margin-bottom: var(--s-5); }
.s-panel figcaption p { max-width: 40em; margin: 0; color: var(--ink-2); font: var(--site-lead); }
.s-panel figcaption small { color: var(--faint); font: var(--t-caption); }
.frame { overflow: hidden; border: 1px solid var(--rule-strong); border-radius: 12px; background: var(--paper); box-shadow: 0 1px 2px rgba(22, 25, 43, .04), 0 28px 56px -40px rgba(22, 25, 43, .3); }
.frame img { display: block; width: 100%; height: auto; }
.try { margin: var(--s-8) 0 0; color: var(--muted); font: var(--site-body); }
.try a { color: var(--ink); font-weight: 600; }
@media (max-width: 640px) { .frame { max-width: 390px; } }

/* ── 7 Questions ─────────────────────────────────────────────────────────── */
.faq-home .faq-list { max-width: 800px; }
.faq-home .more { margin: var(--s-6) 0 0; color: var(--muted); font: var(--site-body); }
.faq-home .more a { color: var(--ink); font-weight: 600; }

/* ── A journey page: the customer's chat beside the owner's real screen ─── */
.jp-hero { padding-bottom: 0; }
.jp-hero .display { max-width: 15em; }
.jp-visual { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; padding-top: clamp(40px, 5vw, 64px) !important; }
.jp-visual figure { margin: 0; min-width: 0; }
.jp-visual figcaption { margin-top: var(--s-3); color: var(--faint); font: var(--t-caption); }
.jp-visual .j-player { --stage-h: 560px; }
.jp-steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-10) clamp(32px, 4vw, 64px); margin: 0; padding: 0; }
.jp-steps li { counter-increment: s; display: flex; flex-direction: column; gap: 6px; padding-top: var(--s-4); border-top: 1px solid var(--rule); }
.jp-steps li::before { content: counter(s); color: var(--red); font: 500 26px/1 var(--serif); margin-bottom: var(--s-2); }
.jp-steps b { font: 600 17px/1.35 var(--sans); }
.jp-steps span { color: var(--muted); font: 400 15.5px/1.6 var(--sans); }
.jp-included { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s-12); max-width: 900px; margin: 0; padding: 0; }
.jp-included li { display: flex; gap: var(--s-3); padding: var(--s-4) 0; border-bottom: 1px solid var(--rule); font: var(--site-body); }
.jp-included .icon { flex: none; margin-top: 3px; color: var(--success); }
.part-head > .j-steps { margin-top: var(--s-5); }
.jp-who { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-8) clamp(32px, 4vw, 64px); margin: 0; }
.jp-who > div { padding-top: var(--s-4); border-top: 1px solid var(--rule); }
.jp-who dt { font: 500 22px/1.2 var(--serif); }
.jp-who dd { margin: var(--s-2) 0 0; color: var(--muted); font: 400 15.5px/1.6 var(--sans); }
.jp-others { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-6); margin: 0; padding: 0; }
.jp-others a { display: flex; flex-direction: column; gap: 4px; padding-top: var(--s-4); border-top: 1px solid var(--rule); text-decoration: none; }
.jp-others b { font: 500 22px/1.2 var(--serif); }
.jp-others a:hover b { text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 4px; }
.jp-others span { color: var(--muted); font: var(--t-body-sm); font-size: 14px; }
.jp-guides { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-6); margin: var(--s-10) 0 0; color: var(--muted); font: var(--site-body); }
.jp-guides a { color: var(--ink); font-weight: 600; }
@media (max-width: 900px) {
  .jp-visual { grid-template-columns: minmax(0, 1fr); }
  .jp-visual .jp-chat { max-width: 380px; }
  .jp-visual .j-player { --stage-h: 480px; }
  .jp-steps, .jp-who { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  .jp-included { grid-template-columns: minmax(0, 1fr); }
  .jp-others { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Reduced motion: nothing plays by itself ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .new, .m-row.fresh, .m-record, .typing i { animation: none !important; }
  .c, .j-tabs button, .s-tabs button, .arrow-link .icon { transition: none; }
}
