/* Finixyz AI: the animated chat demo and the AI page. Used on /ai and the home page. */

.ai-grad {
  background: linear-gradient(120deg, #0b57d0, #4c8df6 55%, #7aa9ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
:root[data-theme='dark'] .ai-grad {
  background-image: linear-gradient(120deg, #a8c7fa, #8ab4f8 55%, #c2d7ff);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .ai-grad {
    background-image: linear-gradient(120deg, #a8c7fa, #8ab4f8 55%, #c2d7ff);
  }
}

/* The Finixyz bird on a blue tile */
.ai-mark {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 30%;
  background: linear-gradient(150deg, #4c8df6, #0b57d0);
  box-shadow: 0 4px 14px -4px rgba(11, 87, 208, 0.5);
}
.ai-mark::before {
  content: '';
  width: 74%;
  height: 74%;
  background: #fff;
  -webkit-mask: url('/assets/brand/finixyz-mark.png') center / contain no-repeat;
  mask: url('/assets/brand/finixyz-mark.png') center / contain no-repeat;
}
.ai-mark.sm {
  width: 24px;
  height: 24px;
}
.ai-mark.lg {
  width: 56px;
  height: 56px;
}
.ai-mark.thinking::before {
  animation: ai-breathe 1.4s ease-in-out infinite;
}
.ai-mark.thinking::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  animation: ai-ripple 1.4s ease-out infinite;
}
@keyframes ai-breathe {
  50% {
    transform: scale(0.82);
    opacity: 0.75;
  }
}
@keyframes ai-ripple {
  from {
    box-shadow: 0 0 0 0 rgba(76, 141, 246, 0.55);
  }
  to {
    box-shadow: 0 0 0 10px rgba(76, 141, 246, 0);
  }
}

/* ---------- the live demo: a chat that asks and answers by itself ---------- */
.ai-demo {
  position: relative;
  border-radius: 28px;
  background: var(--bg);
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px -30px rgba(11, 40, 90, 0.45), 0 4px 14px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 520px;
  text-align: left;
}
.ai-demo::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 180px;
  background: radial-gradient(70% 100% at 0% 0%, rgba(76, 141, 246, 0.16), transparent 70%), radial-gradient(60% 100% at 100% 0%, rgba(11, 87, 208, 0.12), transparent 70%);
  pointer-events: none;
}
.ai-demo .d-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px 10px;
}
.ai-demo .d-head b {
  display: block;
  font: 500 16px/1.2 var(--font);
}
.ai-demo .d-head small {
  font-size: 12px;
  color: var(--muted);
}
.ai-demo .d-head .pill {
  margin-left: auto;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(11, 87, 208, 0.1);
  color: #0b57d0;
  font: 500 11.5px var(--font);
}
.ai-demo .d-body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px 18px 14px;
  overflow: hidden;
}
.ai-demo .d-hello {
  padding-top: 18px;
  transition: opacity 300ms, transform 300ms;
}
.ai-demo .d-hello h4 {
  font: 500 26px/1.15 var(--font);
  letter-spacing: -0.4px;
  margin: 10px 0 6px;
}
.ai-demo .d-hello p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}
.ai-demo .d-sugs {
  display: grid;
  gap: 8px;
}
.ai-demo .d-sug {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  font-size: 13.5px;
  transition: background 200ms, border-color 200ms, transform 200ms;
}
.ai-demo .d-sug .ms {
  color: #0b57d0;
  font-size: 19px;
}
.ai-demo .d-sug.pick {
  background: rgba(11, 87, 208, 0.08);
  border-color: #0b57d0;
  transform: scale(0.98);
}
.ai-demo.chatting .d-hello {
  display: none;
}
.ai-demo .d-q {
  align-self: flex-end;
  max-width: 85%;
  padding: 10px 15px;
  border-radius: 18px 18px 6px 18px;
  background: var(--surface);
  font-size: 14.5px;
  animation: ai-rise 320ms cubic-bezier(0.2, 0, 0, 1) both;
}
.ai-demo .d-a {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: ai-rise 320ms cubic-bezier(0.2, 0, 0, 1) both;
}
.ai-demo .d-a .txt {
  flex: 1;
  min-width: 0;
  font-size: 14.5px;
  line-height: 1.6;
}
.ai-demo .d-a .txt p {
  margin: 0 0 6px;
}
.ai-demo .d-a .txt ul {
  margin: 4px 0 8px;
  padding-left: 18px;
}
.ai-demo .d-a .txt li {
  margin: 3px 0;
}
.ai-demo .d-a strong {
  font-weight: 600;
}
.ai-demo .shimmer {
  display: grid;
  gap: 7px;
  padding-top: 4px;
}
.ai-demo .shimmer i {
  display: block;
  height: 11px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(76, 141, 246, 0.14), rgba(11, 87, 208, 0.3), rgba(122, 169, 255, 0.18), rgba(76, 141, 246, 0.14));
  background-size: 300% 100%;
  animation: ai-shimmer 1.3s linear infinite;
}
.ai-demo .shimmer i:nth-child(2) {
  width: 84%;
}
.ai-demo .shimmer i:nth-child(3) {
  width: 58%;
}
.ai-demo .d-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.ai-demo .d-acts > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 12px 0 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font: 500 12.5px var(--font);
  animation: ai-rise 380ms cubic-bezier(0.2, 0, 0, 1) both;
}
.ai-demo .d-acts .ms {
  color: #0b57d0;
  font-size: 17px;
}
.ai-demo .d-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 14px 14px;
  padding: 6px 6px 6px 16px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: var(--bg);
  transition: box-shadow 200ms, border-color 200ms;
}
.ai-demo .d-box.typing {
  border-color: transparent;
  box-shadow: 0 0 0 2px rgba(11, 87, 208, 0.55), 0 6px 20px -8px rgba(76, 141, 246, 0.5);
}
.ai-demo .d-box .typed {
  flex: 1;
  min-height: 22px;
  font-size: 14.5px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
}
.ai-demo .d-box .typed:empty::before {
  content: 'Ask about deals, leads or a customer…';
  color: var(--muted);
}
.ai-demo .d-box .caret {
  display: inline-block;
  width: 2px;
  height: 18px;
  margin-left: 1px;
  vertical-align: -3px;
  background: #0b57d0;
  animation: ai-blink 900ms steps(1) infinite;
}
.ai-demo .d-box .send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #0b57d0, #4c8df6);
  flex: none;
  transition: transform 150ms;
}
.ai-demo .d-box .send.press {
  transform: scale(0.86);
}
.ai-demo .d-box .send .ms {
  font-size: 21px;
}

/* the floating Ask Finixyz button, shown over a screenshot */
.ai-fab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 20px 0 16px;
  border-radius: 28px;
  color: #fff;
  font: 500 15px var(--font);
  background: linear-gradient(135deg, #0b57d0, #4c8df6);
  box-shadow: 0 12px 26px -8px rgba(11, 87, 208, 0.7);
  animation: ai-fab-ring 3.2s cubic-bezier(0.2, 0, 0, 1) 1s infinite;
}
.ai-fab .bird {
  width: 26px;
  height: 26px;
  background: #fff;
  -webkit-mask: url('/assets/brand/finixyz-mark.png') center / contain no-repeat;
  mask: url('/assets/brand/finixyz-mark.png') center / contain no-repeat;
}
@keyframes ai-fab-ring {
  0% {
    box-shadow: 0 12px 26px -8px rgba(11, 87, 208, 0.7), 0 0 0 0 rgba(76, 141, 246, 0.45);
  }
  45%,
  100% {
    box-shadow: 0 12px 26px -8px rgba(11, 87, 208, 0.7), 0 0 0 16px rgba(76, 141, 246, 0);
  }
}
@keyframes ai-rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
@keyframes ai-shimmer {
  to {
    background-position: -300% 0;
  }
}
@keyframes ai-blink {
  50% {
    opacity: 0;
  }
}

/* ---------- home-page band ---------- */
.ai-band {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 48px;
  align-items: center;
  padding: 56px;
  border-radius: 36px;
  background: radial-gradient(60% 80% at 0% 0%, rgba(76, 141, 246, 0.16), transparent 70%), radial-gradient(60% 80% at 100% 100%, rgba(11, 87, 208, 0.12), transparent 70%), var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
}
.ai-band .eyebrow,
.ai-hero .eyebrow {
  width: fit-content;
  justify-self: start;
  margin-left: 0;
}
.ai-hero .trust,
.ai-hero .ctas {
  justify-content: flex-start;
}
.ai-band .copy .h2 {
  margin: 14px 0 12px;
}
.ai-band .asks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 24px;
}
.ai-band .asks > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 13.5px;
}
.ai-band .asks .ms {
  font-size: 18px;
  color: #0b57d0;
}

/* ---------- /ai page ---------- */
.ai-hero {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 48px;
  align-items: center;
}
.ai-hero .hero-copy {
  text-align: left;
  align-items: flex-start;
  gap: 18px;
}
.ai-hero .eyebrow {
  margin-bottom: 18px;
}
.ai-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.ai-card {
  padding: 22px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.ai-card .ms {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(11, 87, 208, 0.1);
  color: #0b57d0;
  margin-bottom: 14px;
}
.ai-card h3 {
  font: 500 17px/1.3 var(--font);
  margin: 0 0 6px;
}
.ai-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}
.ai-card q {
  display: block;
  margin-top: 12px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 13px;
  quotes: none;
}
.ai-shots {
  position: relative;
}
.ai-shots .fab-over {
  position: absolute;
  right: 6%;
  bottom: 14%;
}
.ai-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  counter-reset: s;
}
.ai-steps > div {
  padding-top: 18px;
  border-top: 2px solid var(--ink);
}
.ai-steps b {
  display: block;
  font: 500 18px var(--font);
  margin: 8px 0 6px;
}
.ai-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}
.ai-steps .n {
  font: 600 13px var(--font);
  color: #0b57d0;
}
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
}
.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.trust-row .ms {
  color: #188038;
  font-size: 19px;
}

@media (max-width: 980px) {
  .ai-band,
  .ai-hero {
    grid-template-columns: 1fr;
    padding: 28px 20px;
    gap: 28px;
  }
  .ai-hero {
    padding: 0;
  }
  .ai-cards,
  .ai-steps {
    grid-template-columns: 1fr;
  }
  .ai-demo {
    min-height: 470px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ai-demo *,
  .ai-fab,
  .ai-mark::before,
  .ai-mark::after {
    animation: none !important;
  }
}
