/* =========================================================================
   Falconet: AI agents page (ai-agents.html only).
   Builds on css/site.css tokens. Each agent demo has its own look on purpose.
   ========================================================================= */

/* ---------- hero: jump links ---------- */
.agent-jump { display: flex; flex-wrap: wrap; gap: 0.5rem; max-width: 66rem; margin-top: clamp(2.5rem, 5vw, 3.5rem); padding-top: 1.75rem; box-shadow: inset 0 1px 0 var(--line); }
.agent-jump-label { width: 100%; margin-bottom: 0.35rem; font-size: 0.88rem; font-weight: 600; color: var(--ink-3); }
.agent-jump a {
  display: inline-flex; align-items: center; gap: 0.55rem; min-height: 44px; padding: 0.4rem 1.05rem 0.4rem 0.45rem; border-radius: 999px;
  font-size: 0.93rem; font-weight: 600; color: var(--ink-2); background: rgba(255, 255, 255, 0.02); box-shadow: inset 0 0 0 1px var(--line-2);
  transition-property: color, background-color, box-shadow; transition-duration: 0.2s; transition-timing-function: var(--ease-ui);
}
.agent-jump a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px rgba(47, 216, 255, 0.45); }
.agent-jump svg { width: 32px; height: 32px; padding: 8px; border-radius: 50%; color: var(--cyan); background: var(--cyan-soft); flex: none; }

/* anchored sections clear the fixed 72px nav */
#how, #tools, .agent { scroll-margin-top: 96px; }

/* ---------- how they work: 3-step flow ---------- */
.flow { --pad: clamp(1.6rem, 3vw, 2.5rem); list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr);
  border-radius: var(--r-xl); background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.005)), var(--bg-2); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.flow li { position: relative; padding: var(--pad); }
.flow li + li { box-shadow: inset 1px 0 0 var(--line); }
.flow-top { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1.5rem; }
.flow-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: var(--ink); background: var(--bg-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.flow-ic svg { width: 22px; height: 22px; }
.flow-ic.is-agent { color: #00131c; background: var(--cyan); box-shadow: none; }
.flow-n { font-size: 0.88rem; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.flow .h3 { margin-bottom: 0.6rem; }
.flow p { max-width: 34ch; }
.flow-arrow { position: absolute; z-index: 1; left: -18px; top: calc(var(--pad) + 6px); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--ink-2); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-2); }
.flow-arrow svg { width: 16px; height: 16px; }
.flow-note { display: flex; align-items: flex-start; gap: 0.85rem; margin-top: 1.5rem; padding: 0 0.25rem; color: var(--ink-2); max-width: 62ch; }
.flow-note svg { width: 22px; height: 22px; flex: none; margin-top: 0.15rem; color: var(--cyan); }
.flow-note b { color: var(--ink); font-weight: 700; }

/* ---------- agent sections (alternate left / right) ---------- */
.agent { padding-block: clamp(4rem, 8vw, 7rem); }
.agent + .agent, .how + .agent { box-shadow: inset 0 1px 0 var(--line); }
.agent-in { align-items: center; }
.agent-in > * { min-width: 0; }
.agent.flip .agent-copy { order: 2; }
.agent-top { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.agent-top .icon-tile { margin: 0; }
.agent-num { font-size: 0.9rem; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.agent-title { font-size: clamp(2.1rem, 3.8vw, 3.1rem); }
.agent-promise { margin-top: 1rem; max-width: 30ch; font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.45; font-weight: 500; color: var(--ink); }
.agent-list { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; gap: 0.8rem; max-width: 44ch; }
.agent-list li { position: relative; padding-left: 2.1rem; color: var(--ink-2); }
.agent-list li::before {
  content: ""; position: absolute; left: 0; top: 0.18em; width: 22px; height: 22px; border-radius: 50%;
  background: var(--cyan-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232fd8ff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4.5 4.5L19 7'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.agent-copy .link-arrow { min-height: 44px; margin-top: 1.75rem; }

/* ---------- demos: shared frame bits ---------- */
.demo { position: relative; width: 100%; max-width: 30rem; margin: 0; justify-self: center; }
.sample-tag { position: absolute; z-index: 2; top: -13px; left: 20px; padding: 0.3rem 0.75rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; line-height: 1.3; color: var(--ink-2); background: var(--bg-3); box-shadow: inset 0 0 0 1px var(--line-2), 0 4px 12px rgba(0, 0, 0, 0.35); white-space: nowrap; }

/* staged entrance inside a demo (plays once the demo is revealed) */
.demo .st { transition-property: opacity, translate; transition-duration: 0.5s, 0.6s; transition-timing-function: var(--ease); transition-delay: calc(300ms + var(--s, 0) * 240ms); }
.js .demo.reveal:not(.in) .st { opacity: 0; translate: 0 10px; }

/* ---------- 01 receptionist: live call transcript ---------- */
.call { padding: 12px; border-radius: 28px; background: linear-gradient(180deg, #121722, #090b11); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line); }
.call-head { display: flex; align-items: center; gap: 0.85rem; padding: 20px 12px 14px; }
.call-av { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; color: var(--cyan); background: var(--cyan-soft); box-shadow: inset 0 0 0 1px rgba(47, 216, 255, 0.3); }
.call-av svg { width: 20px; height: 20px; }
.call-who { display: grid; line-height: 1.3; }
.call-who b { font-weight: 700; }
.call-who small { font-size: 0.82rem; color: var(--ink-3); }
.call-live { margin-left: auto; display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.85rem; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.call-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); }
.wave { display: flex; align-items: center; justify-content: space-between; gap: 3px; height: 40px; padding: 0 14px; margin-bottom: 12px; }
.wave i { flex: 0 0 5px; height: calc(var(--h) * 1%); border-radius: 2px; background: rgba(47, 216, 255, 0.55); animation: wave 1.1s ease-in-out infinite alternate; animation-delay: calc(var(--i) * -97ms); }
@keyframes wave { from { scale: 1 0.3; } to { scale: 1 1; } }
.transcript { display: grid; gap: 0.75rem; padding: 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.03); box-shadow: inset 0 0 0 1px var(--line); }
.line { display: grid; grid-template-columns: 4rem 1fr; gap: 0.75rem; font-size: 0.93rem; line-height: 1.45; color: var(--ink-2); }
.line .who { padding-top: 0.12rem; font-size: 0.78rem; font-weight: 700; color: var(--ink-3); }
.line.is-agent { color: var(--ink); }
.line.is-agent .who { color: var(--cyan); }
.call-out { display: flex; align-items: center; gap: 0.7rem; margin-top: 12px; padding: 12px 16px; border-radius: 16px; font-size: 0.92rem; color: var(--ink-2); background: var(--cyan-soft); box-shadow: inset 0 0 0 1px rgba(47, 216, 255, 0.3); }
.call-out svg { width: 18px; height: 18px; flex: none; color: var(--cyan); }
.call-out b { color: var(--ink); }

/* ---------- 02 lead follow-up: phone text thread ---------- */
.sms { max-width: 23.5rem; padding: 10px; border-radius: 44px; background: linear-gradient(160deg, #2a2e39, #14161d); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line-2); }
.sms-screen { overflow: hidden; border-radius: 34px; background: #000; padding-bottom: 16px; }
.sms-top { display: grid; justify-items: center; gap: 0.3rem; padding: 26px 16px 12px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 -1px 0 var(--line); }
.sms-av { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-weight: 700; color: #fff; background: linear-gradient(180deg, #6b7180, #4a4f5d); }
.sms-name { display: grid; justify-items: center; font-size: 0.85rem; font-weight: 600; line-height: 1.25; }
.sms-name small { font-size: 0.75rem; font-weight: 500; color: var(--ink-3); }
.sms-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 12px 0; font-size: 0.9rem; line-height: 1.35; }
.sms-trigger { align-self: stretch; display: grid; gap: 0.2rem; margin-bottom: 8px; padding: 10px 12px; border-radius: 14px; font-size: 0.8rem; color: var(--ink-2); text-align: center; background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--line); }
.sms-trigger b { font-size: 0.75rem; font-weight: 600; color: var(--ink-3); }
.bub { max-width: 80%; padding: 8px 13px; border-radius: 19px; }
.bub.in { align-self: flex-start; color: var(--ink); background: #26282f; border-bottom-left-radius: 6px; }
.bub.out { align-self: flex-end; color: #00131c; background: var(--cyan); border-bottom-right-radius: 6px; font-weight: 500; }
.sms-meta { align-self: flex-end; margin-top: 2px; font-size: 0.7rem; color: var(--ink-3); }

/* ---------- 03 DM automation: comment, then a DM thread ---------- */
.dm { max-width: 27rem; border-radius: 26px; background: var(--bg-2); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line); }
.dm-post { display: grid; grid-template-columns: 60px 1fr; gap: 14px; padding: 26px 18px 16px; box-shadow: inset 0 -1px 0 var(--line); }
.dm-thumb { width: 60px; height: 60px; border-radius: 14px; background: radial-gradient(60% 60% at 30% 30%, #f0b8c8, transparent 70%), radial-gradient(70% 70% at 80% 80%, #8a6cf0, transparent 70%), #2a2140; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.dm-comment { display: grid; gap: 0.2rem; font-size: 0.92rem; }
.dm-handle { font-weight: 700; }
.dm-handle small { display: block; font-size: 0.76rem; font-weight: 500; color: var(--ink-3); }
.dm-auto { display: inline-flex; align-items: center; gap: 0.35rem; justify-self: start; margin-top: 0.4rem; padding: 0.25rem 0.65rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; color: var(--cyan); background: var(--cyan-soft); }
.dm-auto svg { width: 12px; height: 12px; }
.dm-thread { display: flex; flex-direction: column; gap: 8px; padding: 18px 16px 16px; font-size: 0.9rem; line-height: 1.4; }
.dmb { max-width: 82%; padding: 10px 14px; border-radius: 22px; }
.dmb.out { align-self: flex-end; color: #10131a; background: #eef1f7; }
.dmb.in { align-self: flex-start; color: var(--ink); background: var(--bg-3); box-shadow: inset 0 0 0 1px var(--line-2); }
div.dmb.out { padding: 6px; }
div.dmb.out > p { padding: 4px 8px 8px; }
.dm-link { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 10px 12px; border-radius: 16px; color: var(--ink); background: #10131a; }
.dm-link > span { display: grid; line-height: 1.3; }
.dm-link b { font-size: 0.88rem; }
.dm-link small { font-size: 0.75rem; color: var(--ink-3); }
.dm-link svg { width: 16px; height: 16px; flex: none; color: var(--cyan); }
.dm-seen { align-self: flex-end; font-size: 0.75rem; color: var(--ink-3); }

/* ---------- 04 reviews: request text + light review card ---------- */
.rev { max-width: 28rem; display: grid; gap: 14px; }
.rev-ask { justify-self: start; max-width: 88%; padding: 8px; border-radius: 22px; background: var(--bg-3); box-shadow: var(--shadow-1), inset 0 0 0 1px var(--line); }
.rev-ask-text { display: grid; gap: 0.25rem; padding: 18px 10px 10px; font-size: 0.9rem; line-height: 1.45; color: var(--ink); }
.rev-ask-text small { font-size: 0.75rem; font-weight: 600; color: var(--ink-3); }
.rev-link { display: flex; align-items: center; gap: 0.7rem; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--line); }
.rev-link svg { width: 20px; height: 20px; flex: none; color: var(--cyan); }
.rev-link > span { display: grid; line-height: 1.3; }
.rev-link b { font-size: 0.88rem; }
.rev-link small { font-size: 0.75rem; color: var(--ink-3); }
.rev-card { justify-self: end; width: 94%; padding: 12px; border-radius: 24px; color: #12151d; background: #f3f5fa; box-shadow: var(--shadow-2); }
.rev-head { display: flex; align-items: center; gap: 0.7rem; padding: 6px 6px 0; }
.rev-av { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 50%; font-weight: 700; color: #fff; background: #3c4a66; }
.rev-who { display: grid; line-height: 1.25; }
.rev-who b { font-size: 0.92rem; }
.rev-who small { font-size: 0.75rem; color: #5b6475; }
.rev-stars { display: flex; gap: 2px; margin-left: auto; }
.rev-stars svg { width: 15px; height: 15px; fill: #f2a51a; }
.rev-text { padding: 10px 6px 12px; font-size: 0.93rem; line-height: 1.5; color: #2a303c; }
.rev-reply { padding: 12px 14px 14px; border-radius: 12px; font-size: 0.88rem; line-height: 1.45; color: #2a303c; background: #e3e8f1; }
.rev-reply-label { margin-bottom: 0.3rem; font-size: 0.75rem; font-weight: 700; color: #0a6e8a; }
.rev-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.fake-btn { display: inline-flex; align-items: center; min-height: 32px; padding: 0 0.9rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; color: #12151d; box-shadow: inset 0 0 0 1px rgba(18, 21, 29, 0.2); }
.fake-btn.is-solid { color: #f3f5fa; background: #12151d; box-shadow: none; }

/* ---------- 05 reporting: Monday email ---------- */
.mail { max-width: 29rem; border-radius: 22px; background: var(--bg-2); box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line); }
.mail-head { display: grid; gap: 0.85rem; padding: 28px 20px 16px; border-radius: 22px 22px 0 0; background: rgba(255, 255, 255, 0.025); box-shadow: inset 0 -1px 0 var(--line); }
.mail-from { display: flex; align-items: center; gap: 0.7rem; }
.mail-from > span:last-child { display: grid; line-height: 1.3; }
.mail-from b { font-size: 0.9rem; }
.mail-from small { font-size: 0.76rem; color: var(--ink-3); }
.mail-av { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; font-weight: 900; color: #00131c; background: var(--cyan); }
.mail-subj { font-size: 1.05rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; }
.mail-body { padding: 18px 20px 20px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.kpi { padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); box-shadow: inset 0 0 0 1px var(--line); }
.kpi dt { font-size: 0.75rem; font-weight: 600; color: var(--ink-3); }
.kpi dd { margin: 0.15rem 0 0; font-size: 1.5rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi dd.delta { font-size: 0.75rem; font-weight: 600; letter-spacing: 0; line-height: 1.3; }
.delta.up { color: var(--cyan); }
.delta.down { color: var(--danger); }
.bars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 110px; margin: 20px 0 14px; }
.bars span { display: grid; grid-template-rows: 1fr auto; gap: 6px; height: 100%; }
.bars i { align-self: end; height: calc(var(--v) * 1%); border-radius: 6px 6px 3px 3px; background: rgba(47, 216, 255, 0.28); transform-origin: 50% 100%;
  transition: scale 0.7s var(--ease); transition-delay: calc(400ms + var(--s) * 70ms); }
.bars .is-peak i { background: var(--cyan); }
.bars small { font-size: 0.7rem; font-weight: 600; color: var(--ink-3); text-align: center; }
.js .demo.reveal:not(.in) .bars i { scale: 1 0; }
.mail-note { padding: 12px 14px; border-radius: 12px; font-size: 0.88rem; line-height: 1.5; color: var(--ink-2); background: rgba(255, 255, 255, 0.03); box-shadow: inset 0 0 0 1px var(--line); }
.mail-note b { color: var(--ink); }

/* ---------- 06 dashboards: app window + voice question ---------- */
.dash { max-width: 30rem; padding: 10px; border-radius: 22px; background: #0a0c12; box-shadow: var(--shadow-2), inset 0 0 0 1px var(--line-2); }
.dash-chrome { display: flex; align-items: center; gap: 6px; padding: 18px 8px 12px; }
.dash-chrome i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }
.dash-chrome span { margin-left: 0.6rem; font-size: 0.78rem; font-weight: 600; color: var(--ink-3); }
.dash-in { padding: 14px; border-radius: 12px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.dash-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.dash-kpis div { padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.03); }
.dash-kpis dt { font-size: 0.75rem; font-weight: 600; color: var(--ink-3); }
.dash-kpis dd { margin: 0.1rem 0 0; font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.dash-chart { width: 100%; height: 96px; margin: 14px 0; }
.dash-chart .area { fill: rgba(47, 216, 255, 0.1); }
.dash-chart .chart-line { fill: none; stroke: var(--cyan); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s var(--ease) 0.3s; }
.js .demo.reveal:not(.in) .dash-chart .chart-line { stroke-dashoffset: 1; }
.voice { display: grid; gap: 8px; }
.voice-q { display: flex; align-items: center; gap: 0.7rem; padding: 6px 14px 6px 6px; border-radius: 999px; font-size: 0.88rem; font-weight: 600; color: var(--ink); background: var(--bg-3); box-shadow: inset 0 0 0 1px var(--line-2); }
.mic { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%; color: #00131c; background: var(--cyan); }
.mic svg { width: 16px; height: 16px; }
.voice-a { padding: 10px 14px; border-radius: 14px; font-size: 0.88rem; line-height: 1.45; color: var(--ink-2); background: rgba(47, 216, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(47, 216, 255, 0.2); }
.voice-a b { color: var(--ink); }

/* ---------- works with your tools ---------- */
.tools { box-shadow: inset 0 1px 0 var(--line); }
.tool-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.65rem; }
.chip.tool { gap: 0.6rem; min-height: 52px; padding: 0.45rem 1.15rem 0.45rem 0.5rem; font-size: 1rem; font-weight: 600; color: var(--ink); background: var(--bg-2); }
.chip.tool svg { width: 36px; height: 36px; padding: 9px; flex: none; border-radius: 50%; color: var(--cyan); background: var(--cyan-soft); }
.tools-note { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; margin-top: 1.75rem; color: var(--ink-2); }
.tools-note .link-arrow { min-height: 44px; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .flow { grid-template-columns: 1fr; }
  .flow li + li { box-shadow: inset 0 1px 0 var(--line); }
  .flow-arrow { left: calc(var(--pad) + 6px); top: -18px; }
  .flow-arrow svg { rotate: 90deg; }
  .agent.flip .agent-copy { order: 0; }
  .agent-in { gap: 3.5rem; }
  .demo { justify-self: start; }
}
@media (max-width: 560px) {
  .agent-jump a { font-size: 0.88rem; }
  .line { grid-template-columns: 1fr; gap: 0.1rem; }
  .kpi dd { font-size: 1.25rem; }
  .dash-kpis dd { font-size: 1.1rem; }
  .rev-ask { max-width: 100%; }
  .rev-card { width: 100%; }
  .sample-tag { max-width: calc(100% - 40px); overflow: hidden; text-overflow: ellipsis; }
}
@media (prefers-reduced-motion: reduce) {
  .wave i, .call-live::before { animation: none; }
  .demo .st, .bars i { transition-delay: 0s; }
  .js .demo.reveal:not(.in) .st { translate: none; }
  .js .demo.reveal:not(.in) .bars i { scale: 1 1; }
  .js .demo.reveal:not(.in) .dash-chart .chart-line { stroke-dashoffset: 0; }
}
