/* ============================================================
   Smartest page — AI / Autopilot.
   Loaded only for /smartest via <link precedence> in the page.
   ============================================================ */

.lp-head { max-width: 660px; margin-bottom: clamp(10px, 2vw, 20px); }

/* Desktop: pull the live app up so it sits high on the page, close under
   the brand/headline, instead of trailing well below the fold. */
@media (min-width: 900px) {
  .page-brand { padding-top: clamp(28px, 4vw, 52px); }
  .hero-brand { margin-bottom: 22px; }
  .page-head { padding-top: clamp(8px, 1.4vw, 16px); }
  .lp-head { margin-bottom: 14px; }
  .demo-wrap { margin-top: 20px; }
}

.demo-flag { display: flex; align-items: center; justify-content: center; gap: 9px; margin-bottom: 14px; color: var(--ink-3); font-size: 13.5px; font-weight: 500; }
.demo-flag .dot { width: 8px; height: 8px; border-radius: 999px; background: #2c9e63; box-shadow: 0 0 0 0 rgba(44,158,99,.5); animation: livepulse 2s infinite; }
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 rgba(44,158,99,.45); } 70% { box-shadow: 0 0 0 7px rgba(44,158,99,0); } 100% { box-shadow: 0 0 0 0 rgba(44,158,99,0); } }
.demo-flag b { color: var(--ink); font-weight: 600; }

/* "how it works" narrator — 3 steps above the live embed. Desktop only. */
.ap-steps { display: none; }
@media (min-width: 761px) {
  .ap-steps { display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 8px 6px;
    list-style: none; margin: 0 auto clamp(16px, 2.2vw, 26px); padding: 0; width: min(1080px, 100%); }
  .ap-steps li { display: inline-flex; align-items: center; gap: 9px; font-family: var(--sans); font-size: 14px; color: var(--ink-2); white-space: nowrap; }
  .ap-steps li:not(:last-child)::after { content: "\2192"; margin-left: 10px; color: var(--ink-4); }
  .ap-step-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 999px; background: var(--accent); color: #fff; font-family: var(--sans); font-size: 12px; font-weight: 600; flex-shrink: 0; }
}

/* ---- live app frame ---- */
.appframe {
  position: relative; width: min(1080px, 100%); margin: 0 auto;
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow-lg); background: #fff;
}
.appframe iframe { border: 0; display: block; transform-origin: top left; background: #fff; }
.appframe .frame-skel { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-4); font-size: 13px; font-family: var(--mono); background: var(--bg); transition: opacity .4s var(--ease); }
.appframe.ready .frame-skel { opacity: 0; pointer-events: none; }

/* touch fallback — the live iframe can't shrink to a phone, so on mobile we
   show a looping screen-recording of Autopilot instead. Hidden on wide screens. */
.appframe-touch { display: none; width: 100%; height: auto; }
/* control strip only shows on mobile */
.demo-wrap .vctl { display: none; justify-content: flex-start; margin-top: 10px; }
@media (max-width: 760px) {
  .appframe { aspect-ratio: auto; }
  .appframe iframe, .appframe .frame-skel { display: none !important; }
  .appframe-touch { display: block; }
  .demo-wrap .vctl { display: flex; }
}

/* anticipation beat */
.teaser-beat { min-height: clamp(480px, 84vh, 780px); display: grid; place-items: center; text-align: center; padding: clamp(40px, 7vw, 84px) 0; }
.teaser-next { display: none; }
@media (max-width: 760px) {
  .teaser-beat { min-height: 0; padding: clamp(34px, 11vw, 56px) 0; text-align: left; justify-items: start; }
  .teaser-next { display: block; margin-top: 15px; font-family: var(--sans); font-size: 13.5px; font-weight: 500; letter-spacing: .04em; color: var(--ink-4); }
}

.demo-cap { max-width: 58ch; margin: clamp(18px, 2.4vw, 28px) auto 0; text-align: center; }
.demo-cap p { color: var(--ink-3); font-size: clamp(14px, 1.5vw, 16px); line-height: 1.6; margin: 0; text-wrap: pretty; }
.demo-cap p + p { margin-top: 10px; }

/* headline accent underline on "the work" */
.work-flip { position: relative; display: inline-block; }
.work-flip::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .085em;
  background: currentColor; border-radius: 3px;
  transform: scaleX(0); transform-origin: left center;
  animation: workUnderline .55s cubic-bezier(.45,.05,.2,1) .35s both;
}
@keyframes workUnderline { to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .work-flip::after { animation: none; transform: scaleX(1); } }
