/* Public website. Same colors and type as the dashboard, so the product feels like one thing.
   The chat-bubble corner (round, round, round, sharp) is the shape that repeats. */
:root {
  --bg: #EEF1EC;
  --surface: #FFFFFF;
  --ink: #1C2B2A;
  --muted: #5E6E6A;
  --line: #DCE2DC;
  --pine: #2F6F5E;
  --pine-deep: #1F3B34;
  --pine-mid: #2A5248;
  --mint: #CFE3DA;
  --amber: #E3B23C;
  --amber-deep: #C9971F;
  --red: #C94A3F;
  --bubble: 18px 18px 18px 5px;
  --bubble-r: 18px 18px 5px 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--pine); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; }
h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 750; }
h3 { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 15px; font-weight: 650; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; border-radius: 12px 12px 12px 4px; padding: 10px 18px; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn.large { font-size: 17px; padding: 14px 24px; }
.btn.block { width: 100%; }
.btn.primary { background: var(--pine); color: #fff; }
.btn.primary:hover { background: #285F51; }
.btn.amber { background: var(--amber); color: var(--ink); }
.btn.amber:hover { background: #EDC25A; }
.btn.ghost { color: var(--ink); }
.btn.ghost:hover { background: rgba(28,43,42,.06); }
.btn.outline { border-color: rgba(255,255,255,.4); color: #fff; }
.btn.outline:hover { border-color: #fff; }
.btn:disabled { opacity: .55; cursor: default; }

/* top bar */
.announce { background: var(--amber); color: var(--ink); text-align: center; font-size: 14px; font-weight: 600; padding: 8px 16px; }
.topbar {
  display: flex; align-items: center; gap: 28px; padding: 16px max(24px, calc((100% - 1092px) / 2));
  background: var(--pine-deep); color: #fff;
}
.signup-page .topbar { background: var(--bg); color: var(--ink); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 750; font-size: 18px; color: inherit; text-decoration: none; letter-spacing: -0.01em; }
.mark { width: 30px; height: 30px; border-radius: 10px 10px 10px 3px; background: var(--pine); display: grid; place-items: center; color: #fff; }
.topbar .mark { background: #3F8A75; }
.links { display: flex; gap: 22px; }
.links a { color: inherit; text-decoration: none; font-size: 15px; font-weight: 500; opacity: .85; }
.links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.top-actions { margin-left: auto; display: flex; gap: 8px; }
.topbar .btn.ghost { color: inherit; }
.topbar .btn.ghost:hover { background: rgba(255,255,255,.1); }
.signup-page .topbar .btn.ghost:hover { background: rgba(28,43,42,.06); }

/* hero */
.hero { background: var(--pine-deep); color: #fff; padding: 56px 0 96px; overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.eyebrow { color: var(--mint); font-weight: 600; font-size: 16px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.02; max-width: 13ch; }
.lede { font-size: 19px; line-height: 1.6; color: #D3E2DB; margin-top: 24px; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-note { margin-top: 18px; font-size: 15px; color: #A9C2B8; }

/* the chat window in the hero */
.demo { position: relative; justify-self: end; width: 100%; max-width: 400px; }
.demo-visitors {
  position: absolute; top: -48px; left: -28px; z-index: 2;
  display: flex; align-items: center; gap: 8px; background: #fff; color: var(--ink);
  font-size: 14px; padding: 9px 14px; border-radius: var(--bubble); box-shadow: 0 12px 30px rgba(10,30,25,.3);
}
.demo-visitors .dot { width: 9px; height: 9px; border-radius: 50%; background: #3BB273; box-shadow: 0 0 0 4px rgba(59,178,115,.2); }
.demo-chat { background: #fff; color: var(--ink); border-radius: 22px 22px 22px 6px; overflow: hidden; box-shadow: 0 30px 60px rgba(5,20,16,.45); }
.demo-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; background: var(--pine); color: #fff; }
.demo-head div { display: flex; flex-direction: column; line-height: 1.3; }
.demo-head span:not(.demo-avatar) { font-size: 13px; color: #CFE3DA; }
.demo-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--amber); color: var(--ink); display: grid; place-items: center; font-weight: 700; }
.demo-body { padding: 20px 18px 8px; display: flex; flex-direction: column; gap: 10px; min-height: 290px; background: #F6F8F5; }
.bubble { max-width: 82%; padding: 10px 14px; font-size: 15px; line-height: 1.45; }
.bubble.agent { background: #fff; border: 1px solid var(--line); border-radius: var(--bubble); align-self: flex-start; }
.bubble.visitor { background: var(--pine); color: #fff; border-radius: var(--bubble-r); align-self: flex-end; }
.typing { align-self: flex-start; display: flex; box-sizing: content-box; height: 7px; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: var(--bubble); padding: 13px 14px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #9AAAA4; }
.seen { align-self: flex-start; font-size: 12px; color: var(--muted); margin-top: -4px; }
.demo-input { border-top: 1px solid var(--line); padding: 14px 18px; color: #9AAAA4; font-size: 15px; }

/* One scripted moment on load: the agent types, then the reply appears. */
@media (prefers-reduced-motion: no-preference) {
  .typing { animation: typing-show 2.4s steps(1, end) forwards; }
  .typing i { animation: bounce 1s infinite ease-in-out; }
  .typing i:nth-child(2) { animation-delay: .15s; }
  .typing i:nth-child(3) { animation-delay: .3s; }
  .bubble.reply, .seen { opacity: 0; animation: reply-in .35s ease-out 2.4s forwards; }
  .seen { animation-delay: 3.2s; }
  @keyframes typing-show { 0%, 99% { opacity: 1; } 100% { opacity: 0; height: 0; padding: 0; border-width: 0; margin-top: -10px; overflow: hidden; } }
  @keyframes bounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-4px); } }
  @keyframes reply-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) { .typing { display: none; } }

/* features */
.features { padding: 96px 0 40px; }
.features h2 { max-width: 18ch; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px 40px; margin-top: 52px; }
.feature { border-top: 2px solid var(--ink); padding-top: 20px; }
.f-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px 14px 14px 4px; background: var(--mint); color: var(--pine-deep); margin-bottom: 16px; }
.feature p { color: var(--muted); margin-top: 8px; font-size: 16px; }

/* pricing */
.pricing { padding: 96px 0; }
.pricing-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pricing-head p { max-width: 38em; }
.cycle { display: inline-flex; background: #DCE4DE; border-radius: 14px 14px 14px 4px; padding: 4px; margin-top: 10px; }
.cycle button {
  font: inherit; font-size: 15px; font-weight: 600; border: 0; background: transparent; color: var(--muted);
  padding: 9px 18px; border-radius: 10px 10px 10px 3px; cursor: pointer;
}
.cycle button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(28,43,42,.15); }
.save { display: inline-block; font-size: 12px; font-weight: 700; color: var(--pine-deep); background: var(--mint); border-radius: 8px; padding: 1px 7px; margin-left: 4px; }
.plans { display: grid; gap: 24px; margin: 48px auto 0; align-items: start; }
.plans-1 { max-width: 420px; }
.plans-2 { grid-template-columns: repeat(2, 1fr); max-width: 860px; }
.plans-3 { grid-template-columns: repeat(3, 1fr); }
.plan { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 32px 30px; display: flex; flex-direction: column; }
.plan.featured { background: var(--pine-deep); color: #fff; border-color: var(--pine-deep); border-radius: 22px 22px 22px 6px; }
.plan-flag { position: absolute; top: -14px; left: 30px; background: var(--amber); color: var(--ink); font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 10px 10px 10px 3px; }
.plan h3 { font-size: 24px; }
.plan-tag { color: var(--muted); margin-top: 6px; font-size: 16px; min-height: 2.6em; }
.plan.featured .plan-tag, .plan.featured .price-note, .plan.featured .features-list li { color: #C5D7CF; }
.price { margin-top: 22px; display: flex; align-items: baseline; gap: 4px; }
.amount { font-size: 52px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.per { font-size: 17px; color: var(--muted); font-weight: 500; }
.plan.featured .per { color: #C5D7CF; }
.price-note { font-size: 14px; color: var(--muted); margin-top: 6px; }
.limits { list-style: none; padding: 18px 0; margin: 20px 0 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.plan.featured .limits { border-color: rgba(255,255,255,.16); }
.limits b { font-size: 18px; }

/* the Twilio switch */
.addon { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px 14px 14px 4px; background: var(--bg); margin-bottom: 20px; cursor: pointer; }
.addon > span:last-child { display: flex; flex-direction: column; line-height: 1.4; }
.addon b { font-size: 15px; }
.addon-price { font-size: 14px; color: var(--muted); }
.plan.featured .addon { background: var(--pine-mid); }
.plan.featured .addon-price { color: #C5D7CF; }
.plan.with-addon .addon { box-shadow: inset 0 0 0 2px var(--pine); }
.plan.featured.with-addon .addon { box-shadow: inset 0 0 0 2px var(--amber); }
.switch { position: relative; flex: none; width: 42px; height: 24px; margin-top: 1px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 12px; background: #B9C4BB; transition: background .15s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--pine); }
.plan.featured .switch input:checked + span { background: var(--amber); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 3px solid var(--amber); outline-offset: 2px; }
.features-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; font-size: 15px; }
.features-list li { padding-left: 26px; position: relative; color: var(--muted); }
.features-list li::before { content: ""; position: absolute; left: 2px; top: 6px; width: 12px; height: 7px; border-left: 2px solid var(--pine); border-bottom: 2px solid var(--pine); transform: rotate(-45deg); }
.plan.featured .features-list li::before { border-color: var(--amber); }
.pricing-foot { text-align: center; margin-top: 28px; font-size: 15px; }

/* questions */
.faq { padding: 40px 0 96px; }
.faq-in { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font-weight: 600; font-size: 18px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 16px; font-size: 26px; font-weight: 400; color: var(--pine); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 40px 22px 0; color: var(--muted); max-width: 40em; }

/* closing call to action */
.cta { padding: 0 0 96px; }
.cta-in { background: var(--pine); color: #fff; border-radius: 28px 28px 28px 8px; padding: 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta p { color: #D3E2DB; margin-top: 10px; }

/* footer */
.footer { border-top: 1px solid var(--line); padding: 40px 0 28px; }
.footer-in { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-in p { margin-top: 10px; max-width: 30em; font-size: 15px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.footer-links a { color: var(--ink); text-decoration: none; font-size: 15px; }
.footer-links a:hover { text-decoration: underline; }
.copy { margin-top: 28px; font-size: 14px; }

/* sign-up */
.signup { display: grid; grid-template-columns: 1fr 420px; gap: 56px; padding-top: 56px; padding-bottom: 96px; align-items: start; }
.signup h1 { font-size: clamp(32px, 4vw, 42px); font-weight: 800; letter-spacing: -0.03em; }
.signup-form > .muted { margin-top: 10px; }
.signup-form form { display: flex; flex-direction: column; gap: 18px; margin-top: 32px; max-width: 460px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 600; }
.field input { font: inherit; font-weight: 400; border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px 14px; color: var(--ink); }
.field input:focus { outline: none; border-color: var(--pine); box-shadow: 0 0 0 3px rgba(47,111,94,.18); }
.opt, .hint { font-weight: 400; color: var(--muted); font-size: 14px; }
.form-error { color: var(--red); font-size: 15px; min-height: 1px; }
.form-error:empty { display: none; }
.summary { background: var(--surface); border: 1px solid var(--line); border-radius: 22px 22px 22px 6px; padding: 28px; position: sticky; top: 24px; }
.summary h2 { font-size: 22px; }
.summary .cycle { margin: 16px 0 18px; }
.plan-pick { display: grid; gap: 10px; }
.pick { display: flex; gap: 12px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 14px 14px 14px 4px; padding: 14px; cursor: pointer; }
.pick:has(input:checked) { border-color: var(--pine); background: #F3F8F5; }
.pick input { margin-top: 5px; accent-color: var(--pine); width: 17px; height: 17px; }
.pick-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pick-top { display: flex; justify-content: space-between; gap: 10px; }
.pick-price { font-weight: 600; font-variant-numeric: tabular-nums; }
.pick-limits { font-size: 14px; color: var(--muted); }
.summary .addon { margin: 14px 0 0; }
.total { margin: 20px 0 10px; display: grid; gap: 8px; font-size: 16px; }
.total div { display: flex; justify-content: space-between; gap: 12px; }
.total dt { color: var(--muted); }
.total dd { margin: 0; font-variant-numeric: tabular-nums; }
.total .total-row { border-top: 1px solid var(--line); padding-top: 12px; font-weight: 700; font-size: 19px; }
.total .total-row dt { color: var(--ink); }

/* small screens */
@media (max-width: 960px) {
  .hero-in { grid-template-columns: 1fr; gap: 64px; }
  .demo { justify-self: center; }
  .demo-visitors { left: 12px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .plans-3 { grid-template-columns: 1fr; max-width: 480px; }
  .faq-in { grid-template-columns: 1fr; gap: 24px; }
  .signup { grid-template-columns: 1fr; gap: 32px; }
  .summary { position: static; order: -1; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .topbar { padding: 14px 16px; gap: 12px; }
  .links { display: none; }
  .top-actions .btn { padding: 9px 12px; font-size: 14px; }
  .hero { padding: 40px 0 72px; }
  .lede { font-size: 17px; }
  .feature-grid, .plans-2 { grid-template-columns: 1fr; }
  .plans-2 { max-width: 480px; }
  .features, .pricing { padding: 72px 0 32px; }
  .pricing { padding-bottom: 72px; }
  .plan { padding: 28px 22px; }
  .cta-in { padding: 32px 24px; }
  .summary { padding: 22px 18px; }
}
@media (max-width: 380px) {
  .top-actions .btn.ghost { display: none; }
}
