/* ZLO AI page. Loaded after styles.css, home.css and product.css. */

/* ---- Hero: slow rings turn behind the screens ---------------------------- */

.orbit {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(150%, 780px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.orbit i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--glow-a) 45%, var(--line));
}

.orbit i:nth-child(2) {
  inset: 13%;
  border-style: dashed;
  border-color: color-mix(in srgb, var(--glow-a) 55%, transparent);
}

.orbit i:nth-child(3) {
  inset: 27%;
}

/* A small light travels each ring. */
.orbit i::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tint);
}

.orbit i:nth-child(2)::after {
  background: var(--glow-b);
}

.orbit i:nth-child(3)::after {
  background: var(--glow-c);
}

@media (prefers-reduced-motion: no-preference) {
  .orbit i {
    animation: orbit 38s linear infinite;
  }

  .orbit i:nth-child(2) {
    animation-duration: 26s;
    animation-direction: reverse;
  }

  .orbit i:nth-child(3) {
    animation-duration: 17s;
  }
}

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

/* ---- Demo: pick a question, watch the answer arrive ----------------------- */

.console {
  display: grid;
  gap: 16px;
}

.asks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: start;
}

.ask {
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 200ms var(--ease), background-color 200ms var(--ease), transform 180ms var(--ease);
}

.ask[aria-selected="true"] {
  border-color: var(--tint);
  background: var(--tint-soft);
}

@media (hover: hover) {
  .ask:hover {
    border-color: var(--glow-a);
  }
}

.ask:active {
  transform: scale(0.98);
}

.chat {
  --glow-fill: var(--paper);
  min-height: 430px;
  padding: 28px;
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.chat .you {
  align-self: flex-end;
  max-width: 85%;
  margin: 0;
  padding: 12px 18px;
  border-radius: 20px 20px 6px 20px;
  background: var(--tint-soft);
}

.chat .state {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

.chat .dots {
  display: inline-flex;
  gap: 4px;
}

.chat .dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tint);
  animation: dot 1.2s ease-in-out infinite;
}

.chat .dots i:nth-child(2) {
  animation-delay: 0.2s;
}

.chat .dots i:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dot {
  50% {
    opacity: 0.25;
  }
}

.chat .reply {
  margin: 0;
  font-size: 1.0625rem;
  white-space: pre-line;
}

.chat .reply .caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--tint);
  animation: blink 900ms steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.chat .chips {
  margin-top: 0;
}

.chat .chip {
  opacity: 0;
  transform: translateY(6px);
}

.chat.done .chip {
  opacity: 1;
  transform: none;
  transition: opacity 500ms var(--ease), transform 500ms var(--ease);
  transition-delay: calc(var(--i, 0) * 120ms);
}

.console-note {
  margin: 20px 0 0;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
}

@media (min-width: 900px) {
  .console {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 40px;
    align-items: start;
  }

  .asks {
    flex-direction: column;
  }
}

/* ---- Talk mode: the orb listens, thinks and speaks ------------------------- */

.talk .wrap {
  display: grid;
  gap: 56px;
  align-items: center;
}

.talk h2 {
  max-width: 12ch;
}

.talk .sub {
  margin-bottom: 28px;
}

.orb-stage {
  display: grid;
  justify-items: center;
  gap: 24px;
  text-align: center;
}

.orb {
  position: relative;
  width: min(64vw, 260px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from var(--glow-angle), var(--glow-a), var(--tint-soft), var(--glow-b), var(--glow-c), var(--glow-a));
  box-shadow: 0 30px 80px -20px color-mix(in srgb, var(--glow-a) 70%, transparent), inset 0 0 40px rgb(255 255 255 / 0.5);
  transition: transform 600ms var(--ease);
}

/* Sound waves: three bars that grow while it speaks. */
.orb .wave {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.orb .wave i {
  width: 7px;
  height: 18%;
  border-radius: 999px;
  background: var(--ink);
  opacity: 0.75;
  transform-origin: center;
  transition: height 400ms var(--ease);
}

.orb-stage[data-state="listening"] .wave i:nth-child(odd) {
  height: 12%;
}

.orb-stage[data-state="thinking"] .wave i {
  height: 7px;
}

.orb-status {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.orb-line {
  margin: 0;
  min-height: 3.4em;
  max-width: 34ch;
  color: var(--ink-soft);
  transition: opacity 300ms var(--ease);
}

@media (prefers-reduced-motion: no-preference) {
  .orb {
    animation: glow-turn 9s linear infinite;
  }

  .orb-stage[data-state="listening"] .orb {
    transform: scale(1.05);
  }

  .orb-stage[data-state="thinking"] .orb {
    transform: scale(0.94);
    animation-duration: 2.4s;
  }

  .orb-stage[data-state="speaking"] .wave i {
    animation: wave 900ms ease-in-out infinite;
  }

  .orb-stage[data-state="speaking"] .wave i:nth-child(2) {
    animation-delay: 0.15s;
  }

  .orb-stage[data-state="speaking"] .wave i:nth-child(3) {
    animation-delay: 0.3s;
  }

  .orb-stage[data-state="speaking"] .wave i:nth-child(4) {
    animation-delay: 0.45s;
  }

  .orb-stage[data-state="speaking"] .wave i:nth-child(5) {
    animation-delay: 0.6s;
  }
}

@keyframes wave {
  50% {
    height: 42%;
  }
}

@media (min-width: 900px) {
  .talk .wrap {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 72px;
  }
}

/* ---- What it knows: five cells --------------------------------------------- */

.know {
  display: grid;
  gap: 16px;
}

.know .cell {
  min-height: 260px;
}

.know .cell.leads {
  background: var(--panel);
  justify-content: flex-start;
  padding-bottom: 0;
}

.know .cell.leads img {
  display: block;
  width: min(84%, 320px);
  height: 260px;
  object-fit: cover;
  object-position: 0 34%;
  margin: 28px auto 0;
  border-radius: 28px 28px 0 0;
  border: 1px solid var(--line);
  border-bottom: 0;
}

.know .cell.web {
  background: linear-gradient(140deg, var(--tint-soft), var(--paper) 70%);
}

.know .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 auto;
  padding-bottom: 32px;
}

.know .big {
  margin: 0 0 auto !important;
  padding-bottom: 28px;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink) !important;
  max-width: none !important;
}

.know .big small {
  display: block;
  margin-top: 10px;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-soft);
}

@media (min-width: 900px) {
  .know {
    grid-template-columns: repeat(12, 1fr);
  }

  .know .cell.leads {
    grid-column: span 5;
    grid-row: span 2;
  }

  .know .cell.leads img {
    flex: 1;
    min-height: 0;
    height: auto;
  }

  .know .cell.events {
    grid-column: span 3;
  }

  .know .cell.follow {
    grid-column: span 4;
  }

  .know .cell.web {
    grid-column: span 7;
  }

  .know .cell.deals {
    grid-column: 1 / -1;
    min-height: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 56px;
  }

  .know .cell.deals .stages {
    order: 1;
    flex: 1;
    max-width: 560px;
    margin: 0;
    padding: 0;
  }
}

/* ---- Helpers: three short columns ------------------------------------------ */

.helpers {
  display: grid;
  gap: 40px;
}

.helpers h3 {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--tint);
}

.helpers ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.helpers li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.helpers b {
  display: block;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.helpers span {
  color: var(--ink-soft);
  font-size: 0.9375rem;
}

@media (min-width: 900px) {
  .helpers {
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
  }
}

/* ---- You stay in charge: three large lines --------------------------------- */

.charge {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.charge li {
  display: grid;
  gap: 6px 48px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.charge b {
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.charge span {
  color: var(--ink-soft);
  max-width: 52ch;
}

@media (min-width: 900px) {
  .charge li {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: baseline;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat .dots i,
  .chat .reply .caret {
    animation: none;
  }

  .chat .chip {
    transform: none;
  }

  .orb,
  .orb .wave i {
    transition: none;
  }
}
