/* Provaniq website v3.4 — the character everywhere: search panel, form companion,
   use-cases page, longer chats. Loaded last. */

/* ---------- character moods ---------- */
.p-char.bob { animation: p-bob 2.6s ease-in-out infinite; }
@keyframes p-bob { 50% { transform: translateY(-4px) rotate(-2deg); } }
.p-char.think .pupil { animation: p-think 1.1s ease-in-out infinite; }
@keyframes p-think { 0%, 100% { transform: translate(-2px, -1px); } 50% { transform: translate(2px, -1px); } }
.p-char.happy .eye { ry: 4.5; }
.p-char.cheer { animation: p-cheer .7s cubic-bezier(.3,1.6,.5,1); }
@keyframes p-cheer { 40% { transform: translateY(-10px) rotate(-8deg) scale(1.06); } }

/* ---------- search panel (Ctrl/⌘ K) ---------- */
.sp { position: fixed; inset: 0; z-index: 90; display: none; align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; background: rgba(46,34,56,.35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.sp.open { display: flex; animation: fadeup .25s var(--ease); }
.sp-box { width: min(640px, 100%); background: #fff; border-radius: 26px; box-shadow: 0 40px 80px -30px rgba(46,34,56,.55); overflow: hidden; animation: sp-in .45s cubic-bezier(.3,1.4,.5,1); }
@keyframes sp-in { from { transform: translateY(-16px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.sp-top { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.sp-face { width: 52px; height: 52px; border-radius: 18px; background: var(--peach); display: grid; place-items: center; flex: none; }
.sp-face svg { width: 36px; height: 36px; }
.sp-top input { flex: 1; border: 0; outline: none; font: 600 19px var(--f-display); color: var(--text); background: transparent; min-width: 0; }
.sp-top kbd { font: 500 11.5px var(--f-ui); color: var(--text-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 7px; }
.sp-say { padding: 10px 20px 0; font: 500 13px var(--f-ui); color: var(--text-2); min-height: 26px; }
.sp-list { max-height: 52vh; overflow: auto; padding: 8px 10px 12px; }
.sp-group { font: 600 12px var(--f-ui); color: var(--text-2); padding: 10px 10px 4px; }
.sp-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; text-decoration: none; color: var(--text); opacity: 0; animation: st-in .3s var(--ease) forwards; }
.sp-item .ic { width: 34px; height: 34px; border-radius: 11px; background: var(--lilac-soft); display: grid; place-items: center; flex: none; }
.sp-item .ic .ai { width: 18px; height: 18px; }
.sp-item b { display: block; font: 600 14.5px var(--f-ui); }
.sp-item small { display: block; font-size: 12.5px; color: var(--text-2); }
.sp-item mark { background: var(--peach); color: inherit; border-radius: 4px; padding: 0 2px; }
.sp-item.on, .sp-item:hover { background: var(--peach-soft); }
.sp-item .go { margin-left: auto; color: var(--text-2); font-weight: 700; }
.sp-empty { display: none; text-align: center; padding: 26px 20px 30px; }
.sp-empty.on { display: block; }
.sp-empty b { display: block; font: 700 17px var(--f-display); margin: 6px 0 4px; }
.sp-empty .btn { margin-top: 12px; }
.sp-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 20px 14px; }
.sp-chips button { border: 1px solid var(--line-2); background: #fff; border-radius: 99px; padding: 6px 12px; font: 600 13px var(--f-ui); color: var(--text-2); cursor: pointer; }
.sp-chips button:hover { border-color: var(--coral); color: var(--text); }

/* ---------- form companion ---------- */
.companion { display: flex; gap: 14px; align-items: flex-start; background: var(--aub); color: #fff; border-radius: 24px; padding: 18px; box-shadow: var(--sh-lift); position: relative; overflow: hidden; }
.companion .face { width: 72px; height: 72px; border-radius: 22px; background: #fff; display: grid; place-items: center; flex: none; }
.companion .face svg { width: 50px; height: 50px; }
.companion .say { font: 600 16px/1.45 var(--f-display); min-height: 2.9em; }
.companion small { display: block; color: #CFC6DA; font: 500 12.5px var(--f-ui); margin-bottom: 4px; }
.companion .meter { display: flex; gap: 4px; margin-top: 12px; }
.companion .meter i { width: 22px; height: 6px; border-radius: 99px; background: rgba(255,255,255,.15); transition: background .3s, width .3s; }
.companion .meter i.on { background: var(--coral); width: 30px; }
.spark-fly { position: fixed; z-index: 80; width: 10px; height: 10px; border-radius: 99px; background: var(--coral); pointer-events: none; box-shadow: 0 0 0 4px rgba(242,96,74,.2); }
.side-sticky { position: sticky; top: 96px; display: grid; gap: 12px; }

/* ---------- longer chats ---------- */
.chat { min-height: 460px; }
.msg.q.me { justify-self: start; }
.msg.q.f2 { background: var(--peach-soft); border-color: #FBD9CF; }
.msg.a .act { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; background: #fff; color: var(--aub); border-radius: 99px; padding: 5px 12px; font: 700 12px var(--f-ui); }

/* ---------- use cases page ---------- */
.uc-hero-vis { position: relative; width: min(420px, 100%); aspect-ratio: 1; margin: 0 auto; }
.uc-hero-vis .core { position: absolute; left: 50%; top: 50%; width: 30%; aspect-ratio: 1; transform: translate(-50%, -50%); background: #fff; border-radius: 32%; display: grid; place-items: center; box-shadow: var(--sh-lift); border: 1px solid var(--line); z-index: 2; }
.uc-hero-vis .core svg { width: 64%; }
.uc-hero-vis .ring { position: absolute; inset: 6%; border-radius: 50%; border: 1.5px dashed var(--line-2); animation: spin 40s linear infinite; }
.role { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(var(--r)) translateY(-168px) rotate(calc(-1 * var(--r))); z-index: 3; }
.role span { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 7px 12px; font: 700 13px var(--f-ui); box-shadow: var(--sh-card); white-space: nowrap; transition: background .3s, color .3s, transform .3s var(--ease), border-color .3s; }
.role span::before { content: ""; width: 8px; height: 8px; border-radius: 99px; background: var(--c, var(--coral)); }
.role.on span { background: var(--aub); color: #fff; border-color: var(--aub); transform: scale(1.1); }
.uc-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.uc-nav a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 8px 14px; font: 600 14px var(--f-ui); color: var(--text-2); transition: border-color .2s, color .2s; }
.uc-nav a:hover { border-color: var(--coral); color: var(--text); }
.uc-nav a i { width: 8px; height: 8px; border-radius: 99px; background: var(--c); }
.uc { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 56px 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.uc:nth-of-type(even) > :first-child { order: 2; }
.uc .who { display: inline-flex; align-items: center; gap: 8px; font: 700 13px var(--f-ui); color: var(--text-2); }
.uc .who i { width: 10px; height: 10px; border-radius: 99px; background: var(--c); }
.uc h3 { font-size: 30px; letter-spacing: -.03em; margin: 10px 0 12px; }
.uc .moment { background: var(--paper); border-radius: 16px; padding: 14px 16px; font-size: 15px; color: var(--text-2); border-left: 3px solid var(--c); }
.uc .moment b { color: var(--text); }
.uc ul { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.uc li { display: flex; gap: 10px; font-size: 15px; }
.uc li .ai { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.uc .result { margin-top: 18px; display: inline-flex; align-items: center; gap: 8px; background: var(--ok-bg); color: var(--ok-t); border-radius: 99px; padding: 7px 14px; font: 700 13.5px var(--f-ui); }
.uc .stage { background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 20px; box-shadow: var(--sh-lift); }
.uc .stage .chat { min-height: 360px; }

@media (max-width: 1080px) {
  .uc { grid-template-columns: 1fr; gap: 24px; }
  .uc:nth-of-type(even) > :first-child { order: 0; }
  .side-sticky { position: static; }
}
@media (max-width: 860px) {
  .role { transform: translate(-50%, -50%) rotate(var(--r)) translateY(-128px) rotate(calc(-1 * var(--r))); }
  .role span { font-size: 11.5px; padding: 6px 9px; }
  .chat { min-height: 0; }
  .sp { padding-top: 6vh; }
}
@media (prefers-reduced-motion: reduce) {
  .p-char.bob, .p-char.think .pupil, .uc-hero-vis .ring { animation: none !important; }
  .sp-item { opacity: 1; animation: none; }
}
.msg.a .act { display: flex; width: max-content; }
.msg.a .facts .chip.ok { background: var(--ok-bg); color: var(--ok-t); }
.msg.a .facts .chip.part { background: var(--part-bg); color: var(--part-t); }
.msg.a .facts .chip.rev { background: var(--rev-bg); color: var(--rev-t); }
.msg.a .facts .chip.late { background: var(--late-bg); color: var(--late-t); }
.msg.a .facts .chip.unk { background: var(--unk-bg); color: var(--unk-t); }
.sp-item mark, .qa mark { padding: 0; }
@media (max-width: 1080px) {
  .form-wrap > aside.side-list { order: -1; }
  .form-wrap > aside .src-card { display: none; }
  .form-wrap > aside .side-sticky { position: sticky; top: 76px; z-index: 5; }
  .companion { padding: 12px; border-radius: 18px; }
  .companion .face { width: 52px; height: 52px; border-radius: 16px; }
  .companion .face svg { width: 36px; height: 36px; }
  .companion .say { font-size: 14px; min-height: 2.6em; }
}
