/* Workie — one warm field, large type, almost no chrome. */

:root {
  color-scheme: light;
  --bg: #f4f1ea;
  --ink: #16150f;
  --soft: #514d44;
  --muted: #6f6a5f;
  --line: rgba(22, 21, 15, 0.14);
  --line-strong: rgba(22, 21, 15, 0.3);
  --surface: #fbf9f4;
  --bubble: #e7e2d6;
  --focus: #16150f;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
    "Noto Serif", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --display: var(--serif);

  --radius: 1.25rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --section: clamp(4.5rem, 11vw, 9rem);
  --measure: 34ch;
}

/* Script-aware stacks. CJK and Arabic use the clean system sans for display;
   Latin scripts get the editorial serif. */
html:lang(zh-Hant),
html:lang(yue) {
  --sans: -apple-system, "PingFang TC", "PingFang HK", "Hiragino Sans CNS",
    "Microsoft JhengHei", "Noto Sans CJK TC", "Noto Sans TC", "Segoe UI", Roboto,
    sans-serif;
  --display: var(--sans);
}
html:lang(zh-Hans) {
  --sans: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans CJK SC", "Noto Sans SC", "Segoe UI", Roboto, sans-serif;
  --display: var(--sans);
}
html:lang(ja) {
  --sans: -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic",
    Meiryo, "Noto Sans CJK JP", "Noto Sans JP", "Segoe UI", Roboto, sans-serif;
  --display: var(--sans);
}
html:lang(ko) {
  --sans: -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR",
    "Noto Sans KR", "Segoe UI", Roboto, sans-serif;
  --display: var(--sans);
}
html:lang(ar) {
  --sans: -apple-system, "SF Arabic", "Segoe UI", "Noto Sans Arabic", "Noto Naskh Arabic",
    Tahoma, Arial, sans-serif;
  --display: var(--sans);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.125rem;
  line-height: 1.55;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-underline-offset: 0.16em;
}

p {
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

::selection {
  background: var(--ink);
  color: var(--bg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  inset-inline-start: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  text-decoration: none;
}
.skip:focus {
  top: 1rem;
}

.wrap {
  width: 100%;
  max-width: 70rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---- Header ---------------------------------------------------------- */

.top {
  padding-block: 1rem;
}
.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
}
.wordmark {
  font-family: var(--display);
  font-size: 1.625rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  line-height: 1;
}
.top-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.top-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 0.5rem;
  text-decoration: none;
  color: var(--soft);
}
.top-link:hover {
  color: var(--ink);
}

.lang {
  position: relative;
  display: inline-flex;
}
.lang-select,
.form select {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  color: var(--ink);
  background-color: transparent;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M4 6l4 4 4-4' fill='none' stroke='%2316150f' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-size: 1rem;
  background-position: right 0.9rem center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  min-height: 2.75rem;
  padding: 0.4rem 2.5rem 0.4rem 1rem;
  cursor: pointer;
  max-width: 12rem;
  text-overflow: ellipsis;
}
[dir="rtl"] .lang-select,
[dir="rtl"] .form select {
  background-position: left 0.9rem center;
  padding: 0.4rem 1rem 0.4rem 2.5rem;
}
.lang-select:hover,
.form select:hover {
  border-color: var(--ink);
}

/* ---- Type ------------------------------------------------------------ */

.display {
  font-family: var(--display);
  font-size: clamp(3.25rem, 13vw, 8.25rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  text-wrap: balance;
  max-width: 12ch;
}
html:lang(zh-Hant) .display,
html:lang(zh-Hans) .display,
html:lang(yue) .display,
html:lang(ja) .display,
html:lang(ko) .display {
  font-size: clamp(2.75rem, 10.5vw, 6.5rem);
  line-height: 1.12;
  letter-spacing: 0;
  font-weight: 600;
  max-width: 14ch;
}
html:lang(ar) .display {
  font-size: clamp(3rem, 11vw, 7.25rem);
  line-height: 1.25;
  letter-spacing: 0;
  font-weight: 600;
}
.display-sm {
  font-size: clamp(2.75rem, 9vw, 5.5rem);
  max-width: 18ch;
}
html:lang(zh-Hant) .display-sm,
html:lang(zh-Hans) .display-sm,
html:lang(yue) .display-sm,
html:lang(ja) .display-sm,
html:lang(ko) .display-sm {
  font-size: clamp(2.25rem, 7.5vw, 4.5rem);
}
html:lang(ar) .display-sm {
  font-size: clamp(2.5rem, 8vw, 5rem);
}

.eyebrow {
  color: var(--muted);
  font-size: 1.0625rem;
  margin-bottom: 1.5rem;
}

.lead {
  font-size: clamp(1.25rem, 1.2rem + 0.9vw, 1.625rem);
  line-height: 1.45;
  max-width: var(--measure);
  text-wrap: pretty;
  color: var(--ink);
}

.section-title {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  max-width: 22ch;
  text-wrap: balance;
  margin-bottom: clamp(1.5rem, 4vw, 3rem);
}
html:lang(zh-Hant) .section-title,
html:lang(zh-Hans) .section-title,
html:lang(yue) .section-title,
html:lang(ja) .section-title,
html:lang(ko) .section-title,
html:lang(ar) .section-title {
  letter-spacing: 0;
  font-weight: 600;
  line-height: 1.25;
}

/* ---- Buttons and chips ---------------------------------------------- */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.625rem;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  font: inherit;
  font-size: 1.1875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 140ms ease, background-color 140ms ease;
  width: 100%;
}
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn-primary:hover {
  background: #2a2822;
  border-color: #2a2822;
}
.btn-primary:active {
  transform: translateY(1px);
}

.channels {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
}
.channels-label {
  margin-inline-end: 0.25rem;
  font-size: 1rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding-inline: 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  font-size: 1rem;
  text-decoration: none;
  background: transparent;
}
a.chip:hover {
  border-color: var(--ink);
  background: var(--surface);
}

/* ---- Hero ----------------------------------------------------------- */

.hero {
  padding-block: clamp(3rem, 9vw, 7rem) clamp(2.5rem, 6vw, 5rem);
}
.hero .display {
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
}
.hero .lead {
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}
.hero .channels {
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
}

/* ---- Conversation (the product shot) --------------------------------- */

.demo {
  padding-block: clamp(1rem, 4vw, 3rem) var(--section);
}
.chat {
  margin: 0 auto;
  max-width: 38rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  padding: clamp(1rem, 3vw, 1.75rem);
  box-shadow: 0 40px 80px -48px rgba(22, 21, 15, 0.35),
    0 1px 0 rgba(255, 255, 255, 0.6) inset;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.avatar {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1;
}
.chat-name {
  font-weight: 600;
}
.thread {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.msg {
  display: flex;
  flex-direction: column;
  max-width: 88%;
  animation: rise 560ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.msg:nth-child(1) { animation-delay: 120ms; }
.msg:nth-child(2) { animation-delay: 420ms; }
.msg:nth-child(3) { animation-delay: 760ms; }
.msg:nth-child(4) { animation-delay: 1060ms; }
.msg:nth-child(5) { animation-delay: 1400ms; }
.msg.you {
  align-self: flex-end;
  align-items: flex-end;
}
.msg.bot {
  align-self: flex-start;
  align-items: flex-start;
}
.who {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
  padding-inline: 0.35rem;
}
.msg p {
  padding: 0.8rem 1.1rem;
  border-radius: 1.25rem;
  font-size: 1.0625rem;
  line-height: 1.45;
  text-wrap: pretty;
}
.msg.you p {
  background: var(--ink);
  color: var(--bg);
  border-end-end-radius: 0.4rem;
}
.msg.bot p {
  background: var(--bubble);
  color: var(--ink);
  border-end-start-radius: 0.4rem;
}
.chat figcaption {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
  text-align: center;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---- Sections ------------------------------------------------------- */

.section {
  padding-block: 0 var(--section);
}

.rows {
  margin: 0;
  border-top: 1px solid var(--line);
}
.row {
  padding-block: clamp(1.5rem, 3.5vw, 2.5rem);
  border-bottom: 1px solid var(--line);
}
.row dt {
  font-family: var(--display);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 0.6rem;
}
html:lang(zh-Hant) .row dt,
html:lang(zh-Hans) .row dt,
html:lang(yue) .row dt,
html:lang(ja) .row dt,
html:lang(ko) .row dt,
html:lang(ar) .row dt {
  letter-spacing: 0;
  font-weight: 600;
  line-height: 1.3;
}
.row dd {
  margin: 0;
  max-width: 46ch;
  color: var(--soft);
  font-size: 1.125rem;
  text-wrap: pretty;
}

.steps {
  list-style: none;
  margin: 0 0 clamp(2rem, 5vw, 3.5rem);
  padding: 0;
  border-top: 1px solid var(--line);
}
.step {
  position: relative;
  padding-block: clamp(1.5rem, 3.5vw, 2.5rem);
  border-bottom: 1px solid var(--line);
}
.num {
  display: block;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
  font-variant-numeric: tabular-nums;
}
.step h3 {
  font-family: var(--display);
  font-size: clamp(1.625rem, 3vw, 2.125rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}
html:lang(zh-Hant) .step h3,
html:lang(zh-Hans) .step h3,
html:lang(yue) .step h3,
html:lang(ja) .step h3,
html:lang(ko) .step h3,
html:lang(ar) .step h3 {
  letter-spacing: 0;
  font-weight: 600;
  line-height: 1.3;
}
.step p {
  max-width: 46ch;
  color: var(--soft);
  text-wrap: pretty;
}

/* ---- Footer --------------------------------------------------------- */

.foot {
  border-top: 1px solid var(--line);
  padding-block: 2rem 3rem;
  color: var(--muted);
}
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 1rem;
}
.foot-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--ink);
}

/* ---- Signup --------------------------------------------------------- */

.page-hero {
  padding-block: clamp(2.5rem, 7vw, 5rem) clamp(1.5rem, 4vw, 3rem);
}
.page-hero .display {
  margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
}

.form {
  max-width: 34rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-bottom: clamp(2rem, 5vw, 3rem);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.field label {
  font-size: 1.0625rem;
  color: var(--soft);
}
.form input,
.form select {
  font: inherit;
  font-size: 1.125rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 0.875rem;
  min-height: 3.5rem;
  padding: 0.75rem 1rem;
  width: 100%;
  max-width: none;
}
.form select {
  padding-inline-end: 2.75rem;
  background-color: var(--surface);
}
.form input:focus-visible,
.form select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--ink);
}
.hint {
  font-size: 0.9375rem;
  color: var(--muted);
}
.form .actions {
  margin-top: 0.5rem;
}
.fine {
  font-size: 0.9375rem;
  color: var(--muted);
}
.notice {
  padding: 1rem 1.25rem;
  border: 1px solid var(--line-strong);
  border-radius: 1rem;
  background: var(--surface);
  color: var(--ink);
  text-wrap: pretty;
}
.notice:focus {
  outline: none;
}
.channels-after {
  padding-bottom: var(--section);
}

/* ---- Larger screens ------------------------------------------------- */

@media (min-width: 40em) {
  .btn {
    width: auto;
    min-width: 14rem;
  }
  .lang-select {
    max-width: 14rem;
  }
}

@media (min-width: 48em) {
  body {
    font-size: 1.1875rem;
  }
  .row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    column-gap: clamp(2rem, 5vw, 4rem);
    align-items: baseline;
  }
  .row dt {
    margin-bottom: 0;
  }
  .step {
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr) minmax(0, 2fr);
    column-gap: clamp(1.5rem, 4vw, 3rem);
    align-items: baseline;
  }
  .num {
    margin: 0;
  }
  .step h3 {
    margin: 0;
  }
  .chat {
    padding: 1.75rem 2rem 1.5rem;
  }
  .msg {
    max-width: 80%;
  }
}

@media (min-width: 64em) {
  .hero {
    padding-block: clamp(4rem, 9vw, 8rem) 4rem;
  }
  .demo {
    padding-top: 1rem;
  }
}

/* ---- Motion and print ---------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .msg {
    animation: none;
  }
  .btn {
    transition: none;
  }
}

@media print {
  .top,
  .foot,
  .skip {
    display: none;
  }
}
