/* «Messages and voice notes arrive in your language» on the landing: the text on one side, a phone on the other with
   the app's own chat in it (the same bubbles as web/app/chat.css: theirs soft grey with «original: …» under the
   translation, mine ink, a voice note with ▶, bars and its length). site/chat-demo.js fills it in the page's language
   and plays it once when it scrolls into view: a message arrives in the client's language and turns into the
   visitor's, the voice note plays, the answer goes out. Ink and greys only; orange only for the ↔ of the pair. */
.chatdemo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); gap: clamp(32px, 6vw, 96px); align-items: center; }
.chatdemo-text h2 { margin-bottom: 14px; }
.chatdemo-text p { font-size: var(--fs-h3); font-weight: 500; line-height: 1.35; letter-spacing: -.01em; }

/* An iPhone (Pro proportions, 19.5 : 9): a titanium edge, a black bezel, the side buttons, the Dynamic Island, the
   status bar at 9:41 and the home indicator, all drawn in CSS */
.phone { position: relative; width: min(100% - 8px, 350px); justify-self: center; padding: 11px; border-radius: 60px;
  background: #0d0d0f; box-shadow: 0 0 0 1.5px #8e8e93, 0 0 0 3.5px #c7c7cc, 0 0 0 4.5px #6e6e73, 0 50px 90px -40px rgba(0,0,0,.45); }
.phone::before, .phone::after { content: ''; position: absolute; width: 4px; border-radius: 2px; background: linear-gradient(90deg, #6e6e73, #c7c7cc); }
.phone::before { left: -8px; top: 120px; height: 34px; box-shadow: 0 62px 0 0 #a1a1a6, 0 124px 0 0 #a1a1a6; }
.phone::after { right: -8px; top: 190px; height: 96px; }
.phone-screen { position: relative; aspect-ratio: 9 / 19.5; border-radius: 49px; background: var(--paper); overflow: hidden; display: flex; flex-direction: column; }
.phone-bar { position: relative; height: 54px; flex: none; padding: 0 9% 0 11%; display: flex; align-items: center; justify-content: space-between; color: var(--ink); }
.phone-bar b { font-size: 16px; font-weight: 600; letter-spacing: -.01em; font-family: -apple-system, 'SF Pro Text', var(--sans); }
.phone-island { position: absolute; left: 50%; top: 11px; width: 32%; height: 33px; transform: translateX(-50%); border-radius: 20px; background: #000; }
.phone-icons { display: flex; align-items: center; gap: 5px; }
.phone-icons svg { fill: currentColor; }
.phone-batt { position: relative; width: 25px; height: 12px; padding: 1.5px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(10,10,10,.4); }
.phone-batt::after { content: ''; position: absolute; right: -3px; top: 4px; width: 1.5px; height: 4px; border-radius: 0 1px 1px 0; background: rgba(10,10,10,.4); }
.phone-batt i { display: block; width: 80%; height: 100%; border-radius: 2px; background: var(--ink); }
.phone-home { position: absolute; left: 50%; bottom: 8px; width: 36%; height: 5px; transform: translateX(-50%); border-radius: 3px; background: var(--ink); }
.phone-head { padding: 4px 16px 10px 12px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #f0f0f0; }
.phone-back { color: var(--ink); display: grid; place-items: center; width: 22px; }
[dir=rtl] .phone-back svg { transform: scaleX(-1); }
.phone-ava { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--canvas); font-weight: 700; color: var(--ink); }
.phone-who { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.phone-who b { font-size: 16px; font-weight: 700; line-height: 1.2; }
.phone-pair { font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.phone-pair i { font-style: normal; font-weight: 700; color: var(--orange); }
.phone-log { flex: 1; min-height: 0; padding: 16px 14px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }

.demo-b { max-width: 84%; align-self: flex-start; padding: 10px 14px; border-radius: 18px; background: var(--soft); box-shadow: inset 0 0 0 1px #efefef;
  display: flex; flex-direction: column; gap: 4px; font-size: 15px; line-height: 1.4; text-align: start;
  transition: opacity .45s ease, transform .45s ease; }
.demo-b.mine { align-self: flex-end; background: var(--ink); color: #fafafa; box-shadow: none; }
.demo-b small { font-size: 12px; line-height: 1.35; color: var(--muted); }
.demo-b.mine small { color: rgba(250,250,250,.6); }
.demo-b .say { transition: opacity .3s ease; }
.demo-b small { transition: opacity .4s ease .1s; }
.demo-voice { width: 84%; }
.demo-row { display: flex; align-items: center; gap: 10px; }
.demo-play { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fafafa; }
.demo-wave { flex: 1; min-width: 0; height: 24px; display: flex; align-items: center; gap: 2px; overflow: hidden; }
.demo-wave i { display: block; flex: none; width: 3px; border-radius: 2px; background: rgba(10,10,10,.28); transition: background .15s; }
.demo-wave i.on { background: var(--ink); }
.demo-len { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.phone-send { padding: 10px 12px 30px; display: flex; gap: 8px; align-items: center; border-top: 1px solid #f0f0f0; }
.phone-field { flex: 1; min-width: 0; height: 44px; padding: 0 16px; border-radius: 22px; display: flex; align-items: center; background: var(--soft);
  box-shadow: inset 0 0 0 1px var(--hair); font-size: 15px; color: var(--quiet); }
.phone-mic { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fafafa; }

/* before it plays: the bubbles wait below, hidden; each one rises in its turn */
.chatdemo.ready .demo-b:not(.in) { opacity: 0; transform: translateY(12px); }
.demo-b.turning .say, .demo-b.turning small { opacity: 0; }
.demo-b.raw small { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .demo-b, .demo-b .say, .demo-b small { transition: none; } }

@media (max-width: 900px) {
  .chatdemo { grid-template-columns: 1fr; }
}
@media (max-width: 600px) { .phone { width: min(100% - 24px, 320px); } }
/* «Text messages are free»: a quiet pill under the line, the orange dot marks it like the gift (text costs us ~$0.0002) */
.chatdemo-free { margin-top: 20px; height: 36px; padding: 0 16px; border-radius: 9999px; display: inline-flex; align-items: center; gap: 10px;
  background: var(--paper); box-shadow: 0 0 0 1px var(--hair); font-size: 15px; font-weight: 600; color: var(--ink); }
.chatdemo-free::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
