/* ============================================================
   Clearlii — Ask Clari (AI assistant page)
   ============================================================ */
.clari-hero { position: relative; overflow: hidden; padding: 60px 0 10px; }
.clari-hero .gradient-bg { top: -5%; left: 25%; width: 60%; height: 100%; }
.clari-hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 30px; align-items: end; }
.clari-hero h1 { margin: 0 0 22px; max-width: 13ch; }
.clari-hero .lead { max-width: 46ch; margin: 0 0 10px; }
.clari-photo { position: relative; display: flex; justify-content: center; align-items: flex-end; min-height: 360px; }
.clari-photo img { width: 78%; max-width: 420px; border-radius: 26px 26px 0 0; object-fit: cover; aspect-ratio: 4/4.4; object-position: top; }

/* chat card */
.clari-chat { position: relative; z-index: 2; margin-top: -8px; }
.chat-card {
  background: #fff; border-radius: var(--r-lg); box-shadow: 0 30px 80px rgba(40,20,60,.14);
  border: 1px solid rgba(0,0,0,.05); padding: 26px 28px; 
}
.chat-hint { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--muted); margin-bottom: 6px; }
.chat-hint svg { width: 18px; height: 18px; color: var(--purple); flex: none; }
.chat-thread { display: flex; flex-direction: column; gap: 14px; margin: 14px 0; max-height: 380px; overflow-y: auto; scroll-behavior: smooth; }
.chat-thread:empty { display: none; }
.clari-row { display: flex; gap: 10px; align-items: flex-end; max-width: 80%; }
.clari-row .cava { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; flex: none; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.clari-row .cava img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.msg { max-width: 76%; padding: 13px 17px; border-radius: 18px; font-size: 15px; line-height: 1.6; }
.msg.user { align-self: flex-end; background: var(--purple); color: #fff; border-bottom-right-radius: 6px; animation: msgIn .3s cubic-bezier(.2,.7,.2,1); }
.msg.clari { background: var(--surface); color: var(--ink); border-bottom-left-radius: 6px; animation: msgIn .3s cubic-bezier(.2,.7,.2,1); max-width: 100%; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.msg.clari a { color: var(--purple); text-decoration: underline; text-underline-offset: 2px; }
.msg.clari.streaming::after { content: '\258d'; color: var(--purple); margin-left: 2px; animation: caretBlink .8s steps(1) infinite; }
@keyframes caretBlink { 50% { opacity: 0; } }
/* typing indicator */
.typing-wrap { display: flex; align-items: center; gap: 12px; }
.typing { display: inline-flex; gap: 5px; align-items: center; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--purple); opacity: .35; animation: tdot 1.2s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }
@keyframes tdot { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-5px); opacity: 1; } }
.typing-status { font-size: 12.5px; color: var(--muted); transition: opacity .25s; }
.typing-status.fade { opacity: 0; }
.chat-input { width: 100%; border: none; outline: none; resize: none; font-family: inherit; font-size: 16px; color: var(--ink); min-height: 96px; padding: 8px 0; }
.chat-input::placeholder { color: #b3b7c0; }
.chat-foot { display: flex; justify-content: flex-end; }
.chat-submit { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 26px; border: none; border-radius: var(--r-pill); background: var(--purple); color: #fff; font-family: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; transition: transform .18s, box-shadow .2s, opacity .2s; }
.chat-submit:hover { transform: translateY(-1px); box-shadow: var(--sh-purple); }
.chat-submit:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }
.chat-submit svg { width: 15px; height: 15px; }
.chat-submit.loading svg { animation: spinz 1s linear infinite; }
@keyframes spinz { to { transform: rotate(360deg); } }
.chat-input:disabled { opacity: .6; }

/* examples */
.clari-examples { padding: 44px 0 90px; }
.ex-kicker { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; }
.ex-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ex-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 26px; text-align: left;
  background: var(--surface); border: 1px solid transparent; border-radius: var(--r-md); padding: 26px;
  font-family: inherit; font-size: 14.5px; line-height: 1.6; color: var(--ink); cursor: pointer;
  transition: transform .18s, box-shadow .2s, border-color .2s, background .2s;
}
.ex-card:hover { background: #fff; border-color: rgba(121,33,129,.25); transform: translateY(-3px); box-shadow: var(--sh-soft); }
.ex-card svg { width: 22px; height: 22px; color: var(--ink); }
@media (max-width: 1000px) {
  .clari-hero-grid { grid-template-columns: 1fr; }
  .clari-photo { order: -1; min-height: 0; }
  .clari-photo img { width: 60%; max-width: 300px; aspect-ratio: 4/3.6; border-radius: 26px; }
  .ex-grid { grid-template-columns: 1fr; }
  .msg { max-width: 92%; }
}
