/* "Watch one work" (src/templates/partials/apps-demo.njk): two real recordings,
   web dashboard in a browser frame, iPhone app in a phone frame overlapping its
   corner. Shared by the homepage and /services; tokens come from the host page. */
.appsdemo { padding: 128px 0; background: var(--card); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
.ad-eyebrow { font-size: 15px; font-weight: 500; color: var(--mute); }
.ad-head h2 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.1; letter-spacing: -0.022em; font-weight: 500; margin: 12px 0 18px; max-width: 18ch; text-wrap: balance; }
.ad-body { font-size: 17px; line-height: 1.6; color: var(--mute); max-width: 50ch; }

.ad-stage { position: relative; margin-top: 56px; padding-right: 9%; padding-bottom: 56px; }
.ad-browser { margin: 0; border-radius: 14px; overflow: hidden; background: var(--paper); border: 1px solid var(--hairline); box-shadow: 0 30px 70px rgba(30, 31, 27, 0.16); }
.ad-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; background: var(--cream); border-bottom: 1px solid var(--hairline); }
.ad-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(36, 37, 31, 0.16); }
.ad-bar span { margin: 0 auto; transform: translateX(-27px); font-size: 12.5px; color: var(--mute); background: var(--card); border: 1px solid var(--hairline); border-radius: 8px; padding: 3px 44px; }
.ad-browser video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; background: var(--paper); }
.ad-browser video.ad-chat { display: none; aspect-ratio: 936 / 892; }

.ad-phone { position: absolute; right: 0; bottom: 0; width: 23%; min-width: 200px; margin: 0; border-radius: 13% / 6%; padding: 7px; background: #1c1d19; box-shadow: 0 34px 70px rgba(30, 31, 27, 0.34); }
.ad-phone video { display: block; width: 100%; height: auto; aspect-ratio: 600 / 1304; border-radius: 11% / 5.1%; background: var(--paper); }

.ad-caps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 48px; margin: 44px 0 0; border-top: 1px solid var(--hairline); }
.ad-caps > div { padding-top: 22px; }
.ad-caps dt { font-size: 13.5px; font-weight: 600; color: var(--slate); }
.ad-caps dd { margin: 8px 0 0; font-size: 15.5px; line-height: 1.55; color: var(--mute); max-width: 46ch; }
.ad-caps dd b { color: var(--ink); font-weight: 550; }
.ad-foot { margin-top: 30px; font-size: 13.5px; color: var(--mute); }
.ad-foot a { color: var(--ink); font-weight: 550; text-decoration: none; margin-left: 6px; }
.ad-foot a::after { content: ' >'; color: var(--slate); }
.ad-foot a:hover { color: var(--slate); }

/* Voice mode: a dark panel, who-is-speaking chips beside a recording that plays
   with sound on click (js/voicedemo.js). */
.ad-voice { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: center; margin-top: 72px; padding: 56px; border-radius: 22px; background: #1c1d19; color: #fff; text-align: left; }
.vm-eyebrow { font-size: 15px; font-weight: 500; color: var(--slate-soft); }
.ad-voice h3 { font-size: clamp(26px, 2.6vw, 34px); line-height: 1.12; letter-spacing: -0.02em; font-weight: 500; margin: 10px 0 14px; }
.vm-body { font-size: 16px; line-height: 1.6; color: rgba(255, 255, 255, 0.66); max-width: 36ch; }
.vm-chips { display: flex; flex-direction: column; gap: 12px; min-height: 236px; margin-top: 34px; }
.vm-chip { max-width: 92%; padding: 12px 16px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; opacity: 0.5; transition: opacity .35s ease; }
.vm-chip.on { opacity: 1; }
.vm-chip.off { visibility: hidden; }
.vm-chip p { margin: 0; }
.vm-name { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; margin-bottom: 3px; opacity: 0.8; }
.vm-name span { width: 7px; height: 7px; border-radius: 50%; }
.vm-chip.you { align-self: flex-end; background: rgba(255, 255, 255, 0.92); color: var(--ink); border-bottom-right-radius: 5px; }
.vm-chip.you .vm-name span { background: var(--mute); }
.vm-chip.emp { align-self: flex-start; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.14); border-bottom-left-radius: 5px; }
.vm-chip.emp .vm-name span { background: var(--slate-soft); }
.vm-script { margin-top: 18px; font-size: 14px; color: rgba(255, 255, 255, 0.66); }
.vm-script summary { cursor: pointer; width: fit-content; color: #fff; font-weight: 550; }
.vm-script summary:focus-visible, .vm-play:focus-visible { outline: 2px solid var(--slate-soft); outline-offset: 3px; }
.vm-script ol { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; line-height: 1.5; }
.vm-script b { display: block; font-size: 12.5px; font-weight: 600; color: #fff; }

.vm-player { margin: 0; }
.vm-frame { position: relative; }
.vm-player video { display: block; width: 100%; height: auto; aspect-ratio: 1256 / 800; border-radius: 14px; background: var(--paper); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.4); }
.vm-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 12px; padding: 15px 24px 15px 20px; border: 0; border-radius: 999px; background: var(--ink); color: #fff; font: inherit; font-size: 15.5px; font-weight: 550; white-space: nowrap; cursor: pointer; box-shadow: 0 16px 40px rgba(30, 31, 27, 0.35); transition: transform .2s ease; }
.vm-play[hidden] { display: none; }
.vm-play:hover { transform: translate(-50%, -50%) scale(1.04); }
.vm-play i { width: 13px; height: 15px; background: #fff; clip-path: polygon(0 0, 100% 50%, 0 100%); }
.vm-play span { font-weight: 450; color: rgba(255, 255, 255, 0.6); }
.vm-player figcaption { margin-top: 16px; min-height: 28px; font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, 0.55); }

@media (max-width: 900px) {
  .appsdemo { padding: 88px 0; }
  .ad-stage { margin-top: 36px; padding-right: 0; padding-bottom: 0; }
  .ad-bar span { padding: 3px 18px; transform: translateX(-20px); }
  /* A whole desktop window is unreadable at phone width: play the chat-column cut instead. */
  .ad-browser video.ad-wide { display: none; }
  .ad-browser video.ad-chat { display: block; }
  .ad-phone { position: relative; width: 56%; max-width: 260px; margin: -34px auto 0; }
  .ad-caps { grid-template-columns: 1fr; margin-top: 36px; }
  .ad-caps > div + div { margin-top: 22px; border-top: 1px solid var(--hairline); }
  /* One column: heading, then the recording, then who is speaking. */
  .ad-voice { display: flex; flex-direction: column; align-items: stretch; gap: 0; margin-top: 48px; padding: 30px 20px; border-radius: 18px; }
  .vm-copy { display: contents; }
  .vm-player { order: 1; margin-top: 26px; }
  .vm-chips { order: 2; }
  .vm-script { order: 3; }
  .vm-play { font-size: 14.5px; padding: 13px 20px 13px 17px; }
  .vm-chips { min-height: 0; margin-top: 26px; }
}
