/* ==========================================================================
   /ai/chatbots/ — AI chatbot development

   The page used components that had no styles anywhere (the before/after
   list rendered as run-together text, the build steps as plain paragraphs)
   and nothing to look at but text. Rebuilt with:
     · a WhatsApp-style phone in the hero showing the product doing its job
     · real photographs of the businesses it is for
     · a table that turns into cards on a phone
   Uses the site tokens only, so light and dark both work.
   ========================================================================== */

.page-chatbots { --wa: #25d366; --wa-dark: #075e54; --cb-line: var(--surface-line, rgb(255 255 255 / .1)); }

/* ── HERO ──────────────────────────────────────────────────────────────── */
.cbHero__grid {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: center;
}
/* Sized for HALF the width: at the site's full hero size (72px) the title
   ran to five lines in this column and crowded the paragraph under it. */
.cbHero h1 { max-width: 16ch; font-size: clamp(2.2rem, 1.1rem + 2.7vw, 3.7rem); line-height: 1.06; }
.cbHero .hero__sub { margin-top: var(--s-5); }
.cbFacts {
  list-style: none; margin: var(--s-6) 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .6rem;
}
.cbFacts li {
  display: grid; gap: 1px; padding: .6rem .95rem; border-radius: 14px;
  border: 1px solid var(--cb-line); background: var(--surface-1);
}
.cbFacts b { font-size: var(--fs-sm); color: var(--text-hi); }
.cbFacts span { font-size: var(--fs-xs); color: var(--text-lo); }

/* The phone */
.cbPhone {
  position: relative; justify-self: center;
  width: min(18.5rem, 100%); aspect-ratio: 9 / 17.5; max-height: 36rem;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  border-radius: 2.4rem; padding: .55rem;
  background: linear-gradient(160deg, #2a2b31, #0d0e12);
  box-shadow: 0 0 0 1px rgb(255 255 255 / .08), 0 50px 90px -30px rgb(0 0 0 / .8),
              0 0 80px -20px rgb(37 211 102 / .25);
  transform: rotate(2deg);
  animation: cbFloat 7s ease-in-out infinite;
}
@keyframes cbFloat { 50% { transform: rotate(2deg) translateY(-8px); } }
.cbPhone__notch {
  position: absolute; top: .95rem; left: 50%; translate: -50% 0; z-index: 3;
  width: 5.2rem; height: 1.25rem; border-radius: 99px; background: #000;
}
.cbPhone__bar {
  display: flex; align-items: center; gap: .6rem;
  padding: 2.2rem .9rem .7rem; border-radius: 1.9rem 1.9rem 0 0;
  background: var(--wa-dark); color: #fff;
}
.cbPhone__av {
  width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, #f7d774, #f0c64a); color: #111; font-size: .72rem; font-weight: 800;
}
.cbPhone__who { display: grid; line-height: 1.2; min-width: 0; }
.cbPhone__who b { font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbPhone__who span { font-size: .68rem; opacity: .75; }
.cbTick {
  display: inline-grid; place-items: center; width: .9rem; height: .9rem; margin-left: .15rem;
  border-radius: 50%; background: var(--wa); color: #fff; font-size: .55rem; font-style: normal; vertical-align: 1px;
}
.cbPhone__chat {
  display: flex; flex-direction: column; gap: .45rem; overflow: hidden;
  padding: .8rem .7rem;
  background:
    radial-gradient(circle at 20% 20%, rgb(255 255 255 / .03) 0 1px, transparent 1.5px) 0 0 / 18px 18px,
    #0b141a;
}
.cbDay {
  align-self: center; margin: 0 0 .2rem; padding: .15rem .6rem; border-radius: 6px;
  background: #182229; color: #8696a0; font-size: .62rem;
}
.cbMsg {
  position: relative; max-width: 84%; margin: 0; padding: .45rem .6rem 1.05rem;
  border-radius: 10px; font-size: .78rem; line-height: 1.4; color: #e9edef;
  opacity: 0; transform: translateY(8px) scale(.97);
  animation: cbIn .45s cubic-bezier(.22, 1, .36, 1) forwards; animation-delay: var(--d, 0s);
}
.cbMsg time { position: absolute; right: .5rem; bottom: .25rem; font-size: .56rem; color: #8696a0; }
.cbMsg--in { align-self: flex-start; background: #202c33; border-top-left-radius: 2px; }
.cbMsg--out { align-self: flex-end; background: #005c4b; border-top-right-radius: 2px; }
.cbMsg--out time { color: #9fd8c9; }
.cbMsg b { color: #fff; }
@keyframes cbIn { to { opacity: 1; transform: none; } }
/* The typing dots appear, then give way to the last reply. */
.cbMsg--typing {
  align-self: flex-end; display: flex; gap: .25rem; padding: .6rem .75rem; background: #005c4b;
  animation: cbIn .3s ease forwards, cbGone .2s ease forwards; animation-delay: var(--d), 4.3s;
}
.cbMsg--typing span { width: .38rem; height: .38rem; border-radius: 50%; background: #9fd8c9; animation: cbDot 1s infinite; }
.cbMsg--typing span:nth-child(2) { animation-delay: .15s; }
.cbMsg--typing span:nth-child(3) { animation-delay: .3s; }
@keyframes cbDot { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes cbGone { to { opacity: 0; height: 0; padding: 0; margin: 0; } }
.cbPhone__input {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  margin: 0; padding: .55rem .6rem .7rem; border-radius: 0 0 1.9rem 1.9rem; background: #0b141a;
}
.cbPhone__input span {
  flex: 1; padding: .5rem .8rem; border-radius: 99px; background: #202c33; color: #8696a0; font-size: .72rem;
}
.cbPhone__input i {
  width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--wa); color: #fff; font-style: normal; font-size: .8rem;
}
.cbChip {
  position: absolute; z-index: 4; padding: .45rem .75rem; border-radius: 99px; white-space: nowrap;
  font-size: .72rem; font-weight: 600; color: var(--text-hi);
  background: var(--surface-1); border: 1px solid var(--cb-line);
  box-shadow: 0 14px 30px -14px rgb(0 0 0 / .7);
  transform: rotate(-2deg);
  animation: cbChip 6s ease-in-out infinite;
}
/* Hung off the phone's edges, not over its messages. */
.cbChip--a { top: 17%; right: 88%; }
.cbChip--b { top: 47%; left: 90%; animation-delay: -2s; }
.cbChip--c { bottom: 15%; right: 86%; animation-delay: -4s; }
@keyframes cbChip { 50% { translate: 0 -6px; } }

/* ── WHATSAPP FIRST ───────────────────────────────────────────────────── */
.cbSplit { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.cbSplit__side { display: grid; gap: var(--s-5); }

.cbPhoto { position: relative; margin: 0; overflow: hidden; border-radius: 22px; border: 1px solid var(--cb-line);
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / .7); }
.cbPhoto img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cbPhoto--tall { aspect-ratio: 4 / 3.4; }
.cbPhoto figcaption {
  position: absolute; left: .8rem; right: .8rem; bottom: .8rem;
  padding: .7rem .9rem; border-radius: 14px; font-size: var(--fs-xs); line-height: 1.5; color: #f4f4f5;
  background: rgb(10 10 14 / .72); backdrop-filter: blur(10px); border: 1px solid rgb(255 255 255 / .1);
}

.cbSwap { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.cbSwap__row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.15fr); align-items: center; gap: .6rem;
  padding: .7rem .85rem; border-radius: 14px; border: 1px solid var(--cb-line); background: var(--surface-0, transparent);
}
.cbSwap__from { font-size: var(--fs-xs); color: var(--text-lo); text-decoration: line-through; text-decoration-color: rgb(232 84 74 / .7); }
.cbSwap__arrow { color: var(--accent-ink, #f0c64a); font-weight: 700; }
.cbSwap__to { font-size: var(--fs-sm); font-weight: 600; color: var(--text-hi); }
.cbSwap__to::before { content: '✓'; display: inline-grid; place-items: center; width: 1.1rem; height: 1.1rem; margin-right: .4rem;
  border-radius: 50%; background: rgb(37 211 102 / .18); color: var(--wa); font-size: .62rem; vertical-align: 1px; }

/* ── THE TABLE ─────────────────────────────────────────────────────────── */
.cbTableWrap { border-radius: 20px; border: 1px solid var(--cb-line); background: var(--surface-1); }
.cbTable { margin: 0; }
.cbTable thead th { background: var(--surface-2); font-size: var(--fs-xs); letter-spacing: .06em; text-transform: uppercase; color: var(--text-lo); }
.cbTable th[scope="row"] { font-weight: 600; color: var(--text-hi); text-align: left; }
.cbTable tbody tr { transition: background-color .2s; }
.cbTable tbody tr:hover { background: var(--surface-2); }
.cbOk { display: inline-grid; place-items: center; width: 1.2rem; height: 1.2rem; margin-right: .5rem; border-radius: 50%;
  background: rgb(37 211 102 / .16); color: var(--wa); font-size: .65rem; font-weight: 700; vertical-align: 1px; }
.cbHand { display: inline-block; padding: .2rem .6rem; border-radius: 99px; font-size: var(--fs-xs);
  background: rgb(240 198 74 / .12); color: var(--accent-ink, #f0c64a); border: 1px solid rgb(240 198 74 / .3); }
.cbNone { font-size: var(--fs-xs); color: var(--text-lo); font-style: italic; }
.cbNote {
  display: flex; gap: .7rem; align-items: flex-start; margin: var(--s-5) 0 0; padding: .9rem 1.1rem;
  border-radius: 16px; border: 1px dashed var(--cb-line); color: var(--text-mid); font-size: var(--fs-sm);
}

/* ── WHERE IT WORKS ───────────────────────────────────────────────────── */
.cbUses { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
.cbUse {
  position: relative; overflow: hidden; border-radius: 22px; aspect-ratio: 3 / 4;
  border: 1px solid var(--cb-line); isolation: isolate;
  box-shadow: 0 24px 50px -30px rgb(0 0 0 / .8);
}
.cbUse img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
  transition: transform .8s cubic-bezier(.22, 1, .36, 1); }
.cbUse::after { content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, transparent 30%, rgb(6 6 9 / .55) 55%, rgb(6 6 9 / .95)); }
.cbUse:hover img { transform: scale(1.05); }
.cbUse__body { position: absolute; inset: auto 0 0; padding: 1.1rem; display: grid; gap: .4rem; color: #fff; }
.cbUse h3 { margin: 0; font-size: var(--fs-body); }
.cbUse__ask {
  justify-self: start; margin: 0; padding: .4rem .7rem; border-radius: 12px 12px 12px 3px;
  background: #202c33; color: #e9edef; font-size: .78rem;
}
.cbUse__does { margin: 0; font-size: var(--fs-xs); line-height: 1.5; color: rgb(255 255 255 / .78); }

/* ── LANGUAGE ──────────────────────────────────────────────────────────── */
.cbLang { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.cbLang__photo { aspect-ratio: 4 / 5; }
.cbLang__list { display: grid; gap: var(--s-4); }
.cbBubble {
  padding: 1.1rem 1.2rem; border-radius: 18px; border: 1px solid var(--cb-line); background: var(--surface-1);
  transition: transform .3s cubic-bezier(.22, 1, .36, 1), border-color .3s;
}
.cbBubble:hover { transform: translateX(4px); border-color: rgb(37 211 102 / .4); }
.cbBubble .eyebrow { margin: 0 0 .5rem; }
.cbBubble__q {
  display: inline-block; margin: 0 0 .6rem; padding: .55rem .85rem; border-radius: 14px 14px 14px 4px;
  background: #202c33; color: #e9edef; font-size: var(--fs-body); font-weight: 500;
}
.cbBubble__a { margin: 0; font-size: var(--fs-sm); line-height: var(--lh-body, 1.6); color: var(--text-mid); }
.cbLang__more { margin: var(--s-2) 0 0; }

/* ── HOW WE BUILD IT ──────────────────────────────────────────────────── */
.cbBand { position: relative; margin: 0 0 var(--s-6); overflow: hidden; border-radius: 24px; aspect-ratio: 21 / 8;
  border: 1px solid var(--cb-line); }
.cbBand img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; display: block; }
.cbBand::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(6 6 9 / .85), rgb(6 6 9 / .25) 60%, transparent); }
.cbBand figcaption { position: absolute; left: clamp(1rem, 4vw, 2.5rem); top: 50%; translate: 0 -50%; z-index: 1;
  max-width: 26rem; color: rgb(255 255 255 / .85); font-size: var(--fs-sm); line-height: 1.6; }
.cbBand figcaption b { display: block; margin-bottom: .3rem; font-size: clamp(1.1rem, .9rem + 1vw, 1.6rem); color: #fff; }

.cbSteps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4);
  counter-reset: none; position: relative; }
.cbSteps::before { content: ''; position: absolute; top: 1.35rem; left: 2rem; right: 2rem; height: 2px;
  background: linear-gradient(90deg, var(--accent-ink, #f0c64a), rgb(37 211 102 / .7)); opacity: .5; }
.cbStep { position: relative; padding: 0 .2rem; }
.cbStep__n {
  position: relative; display: grid; place-items: center; width: 2.7rem; height: 2.7rem; margin-bottom: var(--s-3);
  border-radius: 50%; background: var(--surface-0, #0b0b0e); border: 2px solid var(--accent-ink, #f0c64a);
  color: var(--accent-ink, #f0c64a); font-family: var(--font-mono); font-size: .8rem; font-weight: 700;
}
.cbStep:last-child .cbStep__n { border-color: var(--wa); color: var(--wa); }
.cbStep h3 { margin: 0 0 .4rem; font-size: var(--fs-body); color: var(--text-hi); }
.cbStep p { margin: 0; font-size: var(--fs-sm); line-height: var(--lh-body, 1.6); color: var(--text-mid); }

/* ── RESPONSIVE ────────────────────────────────────────────────────────── */
@media (max-width: 64rem) {
  .cbUses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cbSteps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s-6); }
  .cbSteps::before { display: none; }
}
@media (max-width: 56rem) {
  .cbHero__grid, .cbSplit, .cbLang { grid-template-columns: minmax(0, 1fr); }
  .cbPhone { width: min(19rem, 86%); margin-top: var(--s-4); }
  .cbChip--a { right: auto; left: -6%; top: 14%; } .cbChip--b { left: auto; right: -6%; } .cbChip--c { right: auto; left: -4%; }
  .cbLang__photo { aspect-ratio: 16 / 10; }
  .cbBand { aspect-ratio: 16 / 10; }
  .cbBand::after { background: linear-gradient(0deg, rgb(6 6 9 / .9), rgb(6 6 9 / .2) 70%); }
  .cbBand figcaption { top: auto; bottom: 1rem; translate: none; right: 1rem; }
}
@media (max-width: 40rem) {
  .cbUses { grid-template-columns: minmax(0, 1fr); }
  .cbUse { aspect-ratio: 4 / 3.6; }
  .cbSteps { grid-template-columns: minmax(0, 1fr); }
  .cbSwap__row { grid-template-columns: minmax(0, 1fr); gap: .25rem; }
  .cbSwap__arrow { display: none; }
  .cbChip { font-size: .64rem; padding: .35rem .6rem; }
  /* The table becomes a card per row. */
  .cbTableWrap { border: 0; background: none; overflow: visible; }
  .cbTable, .cbTable tbody, .cbTable tr, .cbTable th, .cbTable td { display: block; min-width: 0; width: auto; }
  .cbTable { min-width: 0 !important; }
  .cbTable thead { display: none; }
  .cbTable tr { margin-bottom: .7rem; padding: .9rem 1rem; border-radius: 16px; border: 1px solid var(--cb-line); background: var(--surface-1); }
  .cbTable th[scope="row"] { padding: 0 0 .5rem; font-size: var(--fs-body); border: 0; }
  .cbTable td { padding: .3rem 0; border: 0; font-size: var(--fs-sm); }
  .cbTable td[data-label="Hands over"]::before { content: 'Hands to a human: '; display: block; margin: .3rem 0 .25rem;
    font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-lo); }
}
@media (prefers-reduced-motion: reduce) {
  .cbPhone, .cbChip { animation: none; }
  .cbMsg { animation: none; opacity: 1; transform: none; }
  .cbMsg--typing { display: none; }
  .cbUse img, .cbBubble { transition: none; }
}

/* Touch-ups after review */
@media (min-width: 56.01rem) {
  /* The text column is shorter than the photo + list beside it; keep it in
     view while that side scrolls past, instead of leaving a gap under it. */
  .cbSplit > :first-child { position: sticky; top: 6.5rem; }
}
.cbTable th[scope="row"] {
  font-family: inherit; font-size: var(--fs-sm); letter-spacing: normal; text-transform: none;
}

/* ── FAQ + "still deciding?" ──────────────────────────────────────────── */
.cbFaq { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.cbFaq .faq { max-width: none; }
.cbAsk {
  position: sticky; top: 6.5rem; padding: 1.5rem; border-radius: 22px;
  border: 1px solid rgb(37 211 102 / .3);
  background: radial-gradient(120% 80% at 100% 0%, rgb(37 211 102 / .12), transparent 60%), var(--surface-1);
}
.cbAsk__ico { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 16px; font-size: 1.4rem;
  background: rgb(37 211 102 / .15); margin-bottom: var(--s-3); }
.cbAsk h3 { margin: 0 0 .4rem; font-size: var(--fs-h4, 1.25rem); color: var(--text-hi); }
.cbAsk p { margin: 0 0 var(--s-4); color: var(--text-mid); font-size: var(--fs-sm); }
.cbAsk ul { list-style: none; margin: 0 0 var(--s-5); padding: 0; display: grid; gap: .5rem; }
.cbAsk li { display: flex; gap: .5rem; font-size: var(--fs-sm); color: var(--text-hi); }
.cbAsk li::before { content: '✓'; color: var(--wa); font-weight: 700; }
.cbAsk__wa { width: 100%; justify-content: center; background: var(--wa) !important; color: #06240f !important; border-color: transparent !important; }
.cbAsk__alt { display: block; margin-top: .7rem; text-align: center; font-size: var(--fs-xs); color: var(--text-lo); }
@media (max-width: 56rem) {
  .cbFaq { grid-template-columns: minmax(0, 1fr); }
  .cbAsk { position: static; }
}
@media (max-width: 40rem) { .cbChip--b { display: none; } }   /* sat on a message at phone width */
