/* AI answering and chat: the page's own layout (plan.md "AI answering and chat"). Components and tokens from
   design\components.css and design\system.css; the scenes lay out their own cards. */

/* #top: full-bleed footage changing its picture (kit rotate), the call panel at the upper left (scene anscall), the
   words at the lower left and the form box at the lower right; under 1001 px the words, then the footage with the panel
   at its foot, then the form box */
.ans-top { position: relative; min-height: min(calc(100svh - var(--header-h)), 1000px); background: var(--c-ink); isolation: isolate; scroll-margin-top: var(--header-h); }
.ans-top__stage { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: var(--c-ink); scroll-margin-top: var(--header-h); }
.ans-top__slides { position: absolute; inset: 0; }
/* the kit's rotating header, as kit.md gives it */
[data-kit-scene="rotate"] [data-kit-slide] { position: absolute; inset: 0; margin: 0; visibility: hidden; overflow: hidden; }
[data-kit-scene="rotate"] [data-kit-slide][data-kit-on] { visibility: visible; z-index: 2; opacity: var(--kit-move, 1); transform: translateX(var(--kit-glide, calc((1 - var(--kit-move, 1)) * 4%))); }
[data-kit-scene="rotate"]:not(:has([data-kit-slide][data-prev])) [data-kit-slide][data-kit-on] { transform: none; opacity: 1; }
[data-kit-scene="rotate"] [data-kit-slide][data-prev] { visibility: visible; z-index: 1; }
[data-kit-scene="rotate"] [data-kit-slide] video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
[data-kit-scene="rotate"]:not(:has([data-kit-slide][data-kit-on])) [data-kit-slide]:not([data-kit-slide] ~ [data-kit-slide]) { visibility: visible; }
[data-kit-scene="rotate"] [data-kit-slide] video { inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; clip-path: inset(2px); }
[data-kit-scene="rotate"] [data-kit-slide] video[data-kit-shown] { clip-path: none; }
[data-kit-scene="rotate"] [data-kit-slide][data-prev] { opacity: clamp(0, (1 - var(--kit-move, 0)) * 1000, 1); }
/* the attic clip is shown mirrored, so his face sits right of the panel at every width */
.ans-top__slide--flip video { transform: scaleX(-1); }
/* one still grade over every slide: dark under the header bar and toward the words, clear across the middle */
.ans-top__stage::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .1) 22%, rgba(0, 0, 0, 0) 38%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .52) 74%, rgba(0, 0, 0, .86) 100%), linear-gradient(90deg, rgba(0, 0, 0, .42) 0%, rgba(0, 0, 0, .12) 38%, rgba(0, 0, 0, 0) 58%); }
.ans-top__call { position: absolute; z-index: 4; left: max(var(--gutter), calc((100% - var(--max-w)) / 2)); top: clamp(18px, 4.6svh, 54px); width: min(380px, 27vw); height: 290px; }
.ans-top__stop { position: absolute; z-index: 6; right: max(var(--gutter), calc((100% - var(--max-w)) / 2)); top: 18px; }
.ans-top__in { position: relative; z-index: 5; display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; box-sizing: border-box; min-height: inherit; padding-block: clamp(24px, 5svh, 60px); pointer-events: none; }
.ans-top__in > * { pointer-events: auto; }
.ans-top__words { max-width: 620px; padding-bottom: 4px; }
.ans-top__title { margin: 0; font-size: clamp(2.3rem, 1.1rem + 2.9vw, 3.9rem); font-weight: 800; line-height: 1.04; letter-spacing: -.03em; text-wrap: balance; }
.ans-top__lead { max-width: 540px; margin: clamp(12px, 1.8svh, 18px) 0 0; font-size: var(--fs-lead); line-height: 1.5; color: rgba(246, 251, 253, .9); text-wrap: pretty; }
.ans-top__form { position: relative; flex: 0 0 min(500px, 38vw); }
@media (min-width: 1001px) and (max-height: 820px) {
  .ans-top__form.formbox { padding: 18px 20px; }
  .ans-top__form .tile { min-height: 62px; padding-block: 6px; }
  .ans-top__form .tile__pic { height: 46px; }
  .ans-top__form .formbox__q { margin-bottom: 10px; }
  .ans-top__form .formbox__note { margin-top: 10px; }
  .ans-top__title { font-size: clamp(2.2rem, 1rem + 2.6vw, 3.4rem); }
}
@media (max-width: 1000px) {
  .ans-top { display: flex; flex-direction: column; min-height: 0; }
  .ans-top__in { display: contents; }
  .ans-top__words { order: 1; max-width: none; padding: 22px var(--gutter) 20px; }
  .ans-top__title { font-size: clamp(2rem, 1.2rem + 4vw, 2.9rem); }
  .ans-top__lead { font-size: 1.04rem; }
  .ans-top__stage { order: 2; position: relative; inset: auto; height: clamp(440px, 118vw, 600px); }
  .ans-top__stage::after { background: linear-gradient(180deg, rgba(0, 0, 0, .18) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, .45) 100%); }
  .ans-top__call { left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; height: 270px; }
  .ans-top__stop { top: 14px; right: 14px; }
  .ans-top__form { order: 3; flex: none; width: auto; max-width: 560px; margin: 20px var(--gutter) 30px; }
}
@media (min-width: 761px) and (max-width: 1000px) {
  .ans-top__call { right: auto; left: 24px; bottom: 24px; width: 380px; }
  .ans-top__form { align-self: center; width: calc(100% - 2 * var(--gutter)); margin-inline: 0; }
}

/* #steps: the call and its seven steps on the trace, over the darkened workbench (scene anssteps) */
.ans-steps .part__head { margin-bottom: clamp(28px, 4vw, 48px); }
.ans-steps__stage { height: clamp(620px, 58vw, 740px); }
.ans-steps__stage .stage__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 10, 14, .72) 0%, rgba(4, 10, 14, .6) 50%, rgba(4, 10, 14, .76) 100%); }
.ans-steps__stage, .ans-chat__stage, .ans-night__pic { scroll-margin-top: calc(var(--header-h) + 16px); }
.ans-steps__scene { position: absolute; inset: 0; z-index: 2; }
.ans-steps__stop { position: absolute; z-index: 5; right: 14px; top: 14px; }
@media (max-width: 760px) {
  .ans-steps__stage { height: 980px; }
  .ans-steps__stage .stage__media > img { object-position: 40% 50%; }
}

/* #chat: the website chat as a glass window in front of the night laptop, covering its blank screen (scene anschat) */
.ans-chat__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 14px 56px; align-items: end; margin-bottom: clamp(28px, 4vw, 44px); }
.ans-chat__head .part__lead { margin: 0; }
.ans-chat__stage { height: clamp(600px, 52vw, 700px); }
.ans-chat__scene { position: absolute; inset: 0; z-index: 2; }
.ans-chat__stop { position: absolute; z-index: 5; left: 14px; top: 14px; }
@media (max-width: 900px) { .ans-chat__head { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .ans-chat__stage { height: 560px; }
  .ans-chat__stop { top: auto; bottom: 14px; }
}

/* #night: the owner's lock screen at 6:45 AM on the phone in a hand, the night's calls before and with the answering
   service (the switch); the photo zoomed by a box of its own aspect so the screen stands large */
.ans-night__grid { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 40px clamp(40px, 6vw, 88px); align-items: center; }
.ans-night__words .switch { margin-top: 28px; }
.ans-night__stage { aspect-ratio: 560 / 700; }
.ans-night__zoom { position: absolute; left: -94.2%; top: -20.1%; width: 279.6%; height: 149.1%; }
.ans-night__photo { position: absolute; inset: 0; margin: 0; }
.ans-night__photo > img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.ans-night__photo .screen { background: var(--c-navy); }
.ans-night__photo .screen-rim { background: rgba(0, 0, 0, .82); filter: blur(.8px); }
@media (max-width: 900px) {
  .ans-night__grid { grid-template-columns: minmax(0, 1fr); }
  .ans-night__words { order: -1; }
  .ans-night__pic { width: min(100%, 480px); margin-inline: auto; }
}
@media (max-width: 760px) {
  .ans-night__pic { width: min(100%, 400px); }
  .ans-night__stage { aspect-ratio: 358 / 640; }
  .ans-night__zoom { left: -169.1%; top: -24.5%; width: 424.9%; height: 158.5%; }
}

/* the lock screen, drawn at 300 x 590 */
.ls { position: absolute; inset: 0; display: flex; flex-direction: column; box-sizing: border-box; padding: 0 14px 12px; overflow: hidden; background: radial-gradient(120% 62% at 50% 0%, #1C3A5A 0%, #0B1726 58%, #05090D 100%); font-family: var(--font-ui); color: var(--c-paper); }
.ls p { margin: 0; }
.ls__bar { position: relative; display: flex; align-items: center; justify-content: space-between; height: 34px; padding: 0 6px; font: 600 15px/1 var(--font-ui); }
.ls__cam { position: absolute; left: 50%; top: 11px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #000; box-shadow: inset 0 0 0 2px #10171f; }
.ls__batt { position: relative; width: 24px; height: 12px; box-sizing: border-box; border-radius: 3px; box-shadow: inset 0 0 0 1.5px rgba(246, 251, 253, .9); }
.ls__batt > i { position: absolute; left: 3px; top: 3px; bottom: 3px; width: 13px; border-radius: 1px; background: var(--c-paper); }
.ls__date { margin-top: 22px !important; text-align: center; font: 600 18px/1.2 var(--font-ui); color: rgba(246, 251, 253, .9); }
.ls__big { margin-top: 2px !important; text-align: center; font: 700 82px/1 var(--font-display); letter-spacing: -.03em; color: var(--c-paper); }
.ls__list { display: grid; gap: 10px; margin-top: auto; }
.ls__note { display: grid; padding: 12px 13px; border-radius: 18px; background: rgba(246, 251, 253, .12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16); transition: background-color .32s var(--ease-out), box-shadow .32s var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
.ls__face { grid-area: 1 / 1; min-width: 0; transition: opacity .32s var(--ease-out), visibility .32s; transition-delay: calc(var(--i, 0) * 90ms); }
.ls__app { display: flex; align-items: center; gap: 7px; font: 600 15px/1.4 var(--font-ui); color: rgba(246, 251, 253, .82); }
.ls__ic { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: rgba(246, 251, 253, .16); color: var(--c-paper); }
.ls__ic svg { width: 14px; height: 14px; }
.ls__name { min-width: 0; white-space: nowrap; }
.ls__time { margin-left: auto; flex: none; font-weight: 500; color: rgba(246, 251, 253, .7); }
.ls__top { display: flex; align-items: center; gap: 8px; margin-top: 8px !important; font: 700 18px/1.25 var(--font-ui); color: var(--c-paper); }
.ls__dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--c-alert); box-shadow: 0 0 8px rgba(255, 107, 122, .7); }
.ls__line { margin-top: 3px !important; font: 500 15px/1.35 var(--font-ui); color: rgba(246, 251, 253, .78); }
.ls__a .ls__ic { background: var(--c-brand); color: var(--c-ink); }
.ls__home { align-self: center; flex: none; width: 108px; height: 5px; margin-top: 14px; border-radius: 5px; background: rgba(246, 251, 253, .72); }
/* the switch: each notification turns in place, one after another from the top */
.ans-night .ls__a { opacity: 0; visibility: hidden; }
.ans-night:has(.switch [value="after"]:checked) .ls__b { opacity: 0; visibility: hidden; }
.ans-night:has(.switch [value="after"]:checked) .ls__a { opacity: 1; visibility: visible; }
.ans-night:has(.switch [value="after"]:checked) .ls__note { background: rgba(2, 228, 255, .14); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 0 0 1px rgba(2, 228, 255, .45); }
@media (prefers-reduced-motion: reduce) { .ls__note, .ls__face { transition: none; } }

/* the close: the evening clip's card at the lower left, clear of both faces */
.page-ans .close__card { left: 6%; transform: none; }
