/* The tokens are the application's, from web/src/index.css in quiqr/chatcms,
   so the front page and the thing it leads to are visibly one product. Only
   the light palette is here: this page is a front page, not a workspace
   somebody sits in for a day, and it commits to one look. */

@font-face {
  font-family: "Geist Sans";
  src: url("fonts/geist-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Geist Sans";
  src: url("fonts/geist-sans-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Geist Sans";
  src: url("fonts/geist-sans-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Geist Sans";
  src: url("fonts/geist-sans-latin-800-normal.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  --background: #f7f7f5;
  --foreground: #18181b;
  --card: #ffffff;
  --muted: #f1f1ee;
  --muted-foreground: #52525b;
  --subtle-foreground: #6b6b73;
  --border: #e5e5e2;
  --border-subtle: #ededea;

  --primary: #0b6baa;
  --primary-hover: #08578c;
  --primary-foreground: #ffffff;
  --primary-soft: #e6f2fb;
  --primary-soft-foreground: #0a5a8f;
  --primary-tint: #f2f8fd;
  --ring: #0b6baa;

  --success: #16a34a;

  --font-sans: "Geist Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --page: 1200px;
  --gap: 24px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
p,
ul,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: var(--primary);
}

img,
svg {
  max-width: 100%;
}

.page {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 24px;
}

/* A name for the skip link and for anybody tabbing in. */
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 24px;
  top: 12px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
}

:where(a, button, input):focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

/* ---------- buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.button--primary {
  background: var(--primary);
  color: var(--primary-foreground);
}
.button--primary:hover {
  background: var(--primary-hover);
}

.button--plain {
  background: var(--card);
  color: var(--foreground);
  border-color: var(--border);
}
.button--plain:hover {
  background: var(--muted);
}

.button--small {
  min-height: 44px;
  padding: 10px 18px;
}

.arrow {
  font-size: 17px;
  line-height: 1;
}

/* ---------- header ---------- */

.header {
  padding: 28px 0 8px;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.wordmark img {
  width: 80px;
  height: auto;
  display: block;
}

.wordmark span {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.header__right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header__signin {
  font-size: 16px;
  color: var(--foreground);
  text-decoration: none;
}
.header__signin:hover {
  text-decoration: underline;
}

/* ---------- hero ---------- */

.hero {
  padding: 36px 0 24px;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-soft-foreground);
  font-size: 15px;
  font-weight: 500;
}

.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.hero h1 {
  margin: 28px 0 0;
  font-size: clamp(34px, 5.4vw, 59px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.hero__lead {
  margin: 24px 0 0;
  max-width: 34em;
  font-size: 19px;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

/* ---------- the panel beside the hero ---------- */

.showcase {
  background: var(--primary-soft);
  border-radius: 20px;
  padding: 24px;
  display: grid;
  gap: 16px;
}

.showcase__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.panel {
  background: var(--card);
  border-radius: 14px;
  padding: 18px;
}

.panel__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--muted-foreground);
  margin-bottom: 16px;
}

.panel__title svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
  flex: none;
}

.said {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 15px;
}

.said--person {
  margin-left: auto;
  background: var(--primary);
  color: var(--primary-foreground);
}

.said--assistant {
  margin-top: 12px;
  background: var(--muted);
  color: var(--foreground);
}

.field {
  display: block;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 15px;
}

.field + .field {
  margin-top: 10px;
}

.field--changed {
  border-color: var(--primary);
}

.states {
  display: grid;
  gap: 10px;
  font-size: 15px;
}

.state {
  display: flex;
  align-items: center;
  gap: 10px;
}

.state::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}

.state--saved::before {
  background: var(--success);
}

.state--live::before {
  background: var(--primary);
}

.panel__note {
  margin-top: 12px;
  font-size: 14px;
  color: var(--subtle-foreground);
}

/* ---------- what it does ---------- */

.what {
  padding: 56px 0 8px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: 22px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
}

.card svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.card h3 {
  margin: 18px 0 10px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card p {
  color: var(--muted-foreground);
}

/* ---------- already a customer ---------- */

.customer {
  margin: 56px 0 72px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.customer h2 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.customer p {
  margin-top: 10px;
  max-width: 44ch;
  color: var(--muted-foreground);
}

.customer__actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.customer__actions a:last-child {
  text-decoration: none;
}
.customer__actions a:last-child:hover {
  text-decoration: underline;
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 15px;
  color: var(--muted-foreground);
}

.footer__links {
  display: flex;
  gap: 26px;
}

.footer__links a {
  color: var(--muted-foreground);
  text-decoration: none;
}
.footer__links a:hover {
  text-decoration: underline;
}

/* ---------- narrow ---------- */

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .cards {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  /* One card becomes one list, the way the phone design draws it: a shared
     border rather than three boxes with air between them. */
  .cards .card {
    border-radius: 0;
    border-bottom: none;
    padding: 22px;
  }
  .cards .card:first-child {
    border-radius: 14px 14px 0 0;
  }
  .cards .card:last-child {
    border-radius: 0 0 14px 14px;
    border-bottom: 1px solid var(--border);
  }

  .card__head {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .card svg {
    flex: none;
  }

  .card h3 {
    margin: 0;
    font-size: 18px;
  }

  .card p {
    margin-top: 8px;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 0 20px;
  }

  .header {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    background: var(--card);
  }

  /* The phone has room for one thing in the bar, and the one thing somebody
     arriving on a phone most likely wants is their own website. */
  .header__signin {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 20px;
    border-radius: 10px;
    background: var(--primary);
    color: var(--primary-foreground);
    font-weight: 500;
  }
  .header__signin:hover {
    text-decoration: none;
    background: var(--primary-hover);
  }

  .header__right .button--plain {
    display: none;
  }

  .badge {
    padding: 7px 14px;
    font-size: 14px;
  }

  .wordmark img {
    width: 88px;
  }

  .wordmark span {
    font-size: 18px;
  }

  .hero {
    padding: 28px 0 0;
  }

  .hero h1 {
    margin-top: 22px;
    letter-spacing: -0.03em;
  }

  .hero__lead {
    font-size: 17px;
  }

  .hero__actions {
    margin-top: 26px;
    flex-direction: column;
    align-items: stretch;
  }

  .showcase {
    margin-top: 34px;
    padding: 18px;
  }

  /* Two columns of detail do not fit a phone, so the panel keeps the
     conversation and says the rest in one line. */
  .showcase__row {
    grid-template-columns: minmax(0, 1fr);
  }

  .showcase__row .panel:first-child {
    display: none;
  }

  .showcase .states {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .showcase .state--saved,
  .showcase .panel__note {
    display: none;
  }

  .showcase__row .panel .panel__note--phone {
    display: block;
    margin: 0;
  }

  .what {
    padding: 40px 0 0;
  }

  .customer {
    margin: 36px 0 48px;
    padding: 28px;
    display: block;
  }

  .customer h2 {
    font-size: 26px;
  }

  .customer__actions {
    margin-top: 24px;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .customer__actions .button {
    width: 100%;
  }

  .customer__actions a:last-child {
    text-align: center;
    color: var(--primary);
  }

  .footer__inner {
    display: block;
  }

  .footer__links {
    margin-top: 16px;
  }
}

/* The phone-only line inside the states panel. */
.panel__note--phone {
  display: none;
}

/* ---------- a page of words ---------- */

/* The left edge lines up with the logo above it, so what is constrained is
   the line length rather than the block. */
.prose {
  padding-top: 40px;
  padding-bottom: 72px;
}

.prose > * {
  max-width: 68ch;
}

.prose h1 {
  font-size: clamp(34px, 5vw, 46px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.prose h2 {
  margin-top: 40px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.prose p,
.prose__list {
  margin-top: 14px;
  color: var(--muted-foreground);
}

.prose__lead {
  margin-top: 20px;
  font-size: 19px;
  line-height: 1.6;
}

.prose__list li {
  position: relative;
  padding-left: 22px;
  margin-top: 8px;
}

.prose__list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.prose__note {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 15px;
  color: var(--subtle-foreground);
}
