/* ==========================================================================
   Tokens
   Shape rule: buttons and pills are fully rounded, panels are 22px,
   chat bubbles are 18px. Z-index scale: header 10, skip link 20.
   Breakpoints (media queries cannot read custom properties):
   40rem = two-column grids, 56rem = desktop layouts.
   ========================================================================== */

:root {
  color-scheme: light dark;

  --paper: #f5f7f5;
  --surface: #fcfdfc;
  --ink: #141819;
  --ink-2: #555d61;
  --line: #dce1de;
  --line-strong: #7f8884;
  --accent: #1e5b47;
  --accent-hover: #164535;
  --accent-ink: #fbfcfb;
  --accent-shadow: rgb(30 91 71 / 0.32);
  --tint: #e2ece7;
  --tint-ink: #10261e;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-panel: 22px;
  --radius-bubble: 18px;
  --container: 70rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(4.5rem, 2.5rem + 7vw, 8.5rem);
  --header-h: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1211;
    --surface: #151a19;
    --ink: #eceeed;
    --ink-2: #a3aba7;
    --line: #283130;
    --line-strong: #5f6966;
    --accent: #84c7aa;
    --accent-hover: #a3d8c0;
    --accent-ink: #0e1211;
    --accent-shadow: rgb(132 199 170 / 0.22);
    --tint: #1b2a25;
    --tint-ink: #e3eee9;
  }
}

/* ==========================================================================
   Base
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  accent-color: var(--accent);
}

/* Column layout keeps the footer at the bottom on short pages. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

a {
  color: inherit;
}

svg {
  display: block;
  flex-shrink: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

/* Holds the shared SVG symbols (logo, check). Not display:none, so symbols render everywhere. */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: 0.75rem;
  z-index: 20;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

/* ==========================================================================
   Type
   ========================================================================== */

.display {
  font-size: clamp(2.375rem, 1.3rem + 4vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.032em;
  font-weight: 600;
  text-wrap: balance;
}

.h2 {
  font-size: clamp(1.875rem, 1.3rem + 2vw, 2.875rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 600;
  text-wrap: balance;
}

.h3 {
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.012em;
  font-weight: 600;
}

.h4 {
  font-size: 1.0625rem;
  line-height: 1.35;
  font-weight: 600;
}

.lead {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem);
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}

.muted {
  color: var(--ink-2);
}

/* Shared small secondary text under item headings */
.features p,
.step p,
.plan-desc {
  font-size: 0.9375rem;
  color: var(--ink-2);
}

/* ==========================================================================
   Buttons and interactive feedback
   Hover styles apply only on devices that can hover, so taps on phones
   never leave a button stuck in its hover state.
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    color 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.btn-quiet {
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-small {
  min-height: 38px;
  padding: 0 1rem;
  font-size: 0.9375rem;
}

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

@media (hover: hover) {
  .btn-primary:hover {
    background: var(--accent-hover);
    box-shadow: 0 8px 20px -8px var(--accent-shadow);
  }

  .btn-quiet:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn:hover {
    transform: translateY(-2px);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .btn:active {
    transform: translateY(0) scale(0.97);
    box-shadow: none;
  }
}

/* ==========================================================================
   Header and footer
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: auto;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-decoration: none;
  transition: opacity 0.2s var(--ease);
}

.brand-mark {
  width: 26px;
  height: 26px;
}

.nav {
  display: flex;
  gap: 1.75rem;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.9375rem;
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-decoration-color: transparent;
  text-underline-offset: 0.45em;
  transition: color 0.2s var(--ease), text-decoration-color 0.2s var(--ease);
}

.nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 500;
  text-decoration-color: var(--line-strong);
}

@media (hover: hover) {
  .brand:hover {
    opacity: 0.7;
  }

  .nav a:hover {
    color: var(--ink);
    text-decoration-color: var(--accent);
  }
}

@media (max-width: 40rem) {
  .header-inner {
    gap: 1rem;
  }

  .nav {
    gap: 1.125rem;
  }
}

/* Footer: one quiet line under the finale, on the same surface. */
.site-footer {
  padding-block: 1.5rem;
  background: var(--surface);
  font-size: 0.875rem;
  color: var(--ink-2);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.015em;
  text-decoration: none;
  transition: opacity 0.2s var(--ease);
}

.footer-brand .brand-mark {
  width: 22px;
  height: 22px;
}

@media (hover: hover) {
  .footer-brand:hover {
    opacity: 0.7;
  }
}

/* ==========================================================================
   Sections
   ========================================================================== */

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

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 40rem;
  margin-bottom: clamp(2.5rem, 1.5rem + 3vw, 4rem);
}

/* Finale: the closing statement every page ends on. */
.finale {
  padding-block: var(--section) clamp(3.5rem, 2.5rem + 3vw, 5rem);
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.finale-title {
  max-width: 17em;
  margin-top: 2rem;
  font-size: clamp(2.125rem, 1.2rem + 3.4vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 600;
  text-wrap: balance;
}

.finale .lead {
  max-width: 36ch;
  margin-top: 1.25rem;
}

.finale .btn {
  margin-top: 2.25rem;
}

/* Typing indicator: the assistant is already replying. */
.typing {
  display: inline-flex;
  gap: 5px;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-bubble);
  border-bottom-left-radius: 6px;
  background: var(--tint);
}

.typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.6;
}

@media (prefers-reduced-motion: no-preference) {
  .typing span {
    animation: typing 1.4s ease-in-out infinite;
  }

  .typing span:nth-child(2) { animation-delay: 0.2s; }
  .typing span:nth-child(3) { animation-delay: 0.4s; }
}

@keyframes typing {
  0%, 60%, 100% {
    opacity: 0.3;
    translate: 0 0;
  }

  30% {
    opacity: 1;
    translate: 0 -3px;
  }
}

/* Shared panel surface */
.chat,
.pillar,
.plan {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
}

/* ==========================================================================
   Home hero
   ========================================================================== */

.hero {
  padding-block: clamp(3.5rem, 2rem + 5vw, 6rem) var(--section);
}

.hero-title {
  max-width: 17em;
}

.hero-body {
  display: grid;
  gap: 3rem;
  margin-top: clamp(2rem, 1rem + 3vw, 3.5rem);
}

.hero-copy .lead {
  max-width: 32ch;
}

.hero-copy .actions {
  margin-top: 2rem;
}

@media (min-width: 56rem) {
  .hero-body {
    grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
    gap: 4rem;
    align-items: start;
  }
}

/* ==========================================================================
   Example chat
   ========================================================================== */

.chat {
  padding: 1.25rem;
}

.chat-caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 0.25rem 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--ink-2);
}

.chat-thread {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bubble {
  max-width: 85%;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-bubble);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.bubble-in {
  align-self: flex-start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-bottom-left-radius: 6px;
}

.bubble-out {
  align-self: flex-end;
  background: var(--tint);
  color: var(--tint-ink);
  border: 1px solid transparent;
  border-bottom-right-radius: 6px;
}

/* The one ambient motion on the site: the hero conversation fades in once. */
@media (prefers-reduced-motion: no-preference) {
  .chat-play .bubble {
    animation: bubble-in 0.6s var(--ease) both;
    animation-delay: 0.3s;
  }

  .chat-play .bubble:nth-child(2) { animation-delay: 1s; }
  .chat-play .bubble:nth-child(3) { animation-delay: 1.7s; }
  .chat-play .bubble:nth-child(4) { animation-delay: 2.4s; }
  .chat-play .bubble:nth-child(5) { animation-delay: 3.1s; }
}

@keyframes bubble-in {
  from {
    opacity: 0;
  }
}

/* ==========================================================================
   Pillars
   ========================================================================== */

.pillars {
  display: grid;
  gap: 1rem;
}

@media (min-width: 40rem) {
  .pillars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.pillar {
  padding: clamp(1.75rem, 1.2rem + 2vw, 2.5rem);
}

.pillar-icon {
  width: 28px;
  height: 28px;
  margin-bottom: 2.5rem;
  color: var(--accent);
}

.pillar p {
  max-width: 36ch;
  margin-top: 0.5rem;
  color: var(--ink-2);
}

/* ==========================================================================
   Customer journey (vertical on mobile, horizontal on desktop)
   ========================================================================== */

.journey {
  display: grid;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 0 0 2.25rem 3rem;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: var(--paper);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
}

.step::after {
  content: "";
  position: absolute;
  left: calc(0.875rem - 0.5px);
  top: 2.25rem;
  bottom: 0.5rem;
  width: 1px;
  background: var(--line);
}

.step:last-child {
  padding-bottom: 0;
}

.step:last-child::after {
  display: none;
}

.step h3 {
  line-height: 1.75rem;
}

.step p {
  margin-top: 0.25rem;
}

@media (min-width: 56rem) {
  .journey {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .step,
  .step:last-child {
    padding: 2.75rem 0 0;
  }

  .step::after {
    left: 2.375rem;
    right: -0.875rem;
    top: calc(0.875rem - 0.5px);
    bottom: auto;
    width: auto;
    height: 1px;
  }
}

/* ==========================================================================
   Inner page hero
   ========================================================================== */

.page-hero {
  padding-block: clamp(3.5rem, 2rem + 5vw, 6rem) clamp(2.5rem, 1.5rem + 3vw, 4rem);
}

.page-hero .lead {
  max-width: 38ch;
  margin-top: 1.25rem;
}

main {
  flex: 1;
}

.not-found .actions {
  margin-top: 2rem;
}

.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.25rem;
}

.jump a {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.9375rem;
  color: var(--ink);
  text-decoration: none;
  transition:
    background-color 0.2s var(--ease),
    border-color 0.2s var(--ease),
    color 0.2s var(--ease);
}

@media (hover: hover) {
  .jump a:hover {
    background: var(--tint);
    border-color: var(--accent);
    color: var(--tint-ink);
  }
}

/* ==========================================================================
   Solutions
   ========================================================================== */

.industry {
  padding-block: clamp(3.5rem, 2rem + 4vw, 6rem);
  border-top: 1px solid var(--line);
  scroll-margin-top: var(--header-h);
}

.industry-inner {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 56rem) {
  .industry-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
    gap: 4rem;
    align-items: start;
  }
}

.features {
  display: grid;
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 40rem) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
  }
}

.features p {
  margin-top: 0.25rem;
}

/* ==========================================================================
   Pricing
   ========================================================================== */

.section-plans {
  padding-bottom: var(--section);
}

.pilot {
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-panel);
  background: var(--tint);
  color: var(--tint-ink);
}

.pilot strong {
  font-weight: 600;
}

.plans {
  display: grid;
  gap: 1rem;
}

@media (min-width: 56rem) {
  .plans {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.plan {
  display: flex;
  flex-direction: column;
  padding: clamp(1.75rem, 1.2rem + 1.5vw, 2.25rem);
}

.plan-desc {
  margin-top: 0.5rem;
}

/* Reserve two lines so prices line up across the three columns. */
@media (min-width: 56rem) {
  .plan-desc {
    min-height: 3.1em;
  }
}

.plan-price {
  margin-top: 1.75rem;
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
}

.plan-period {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-2);
}

.price-tag {
  align-self: flex-start;
  margin-top: 0.75rem;
  padding: 0.125rem 0.625rem;
  border-radius: 999px;
  background: var(--tint);
  color: var(--tint-ink);
  font-size: 0.75rem;
  font-weight: 500;
}

/* Monthly limits: the numbers are the point, so they lead each line. */
.limits-title {
  margin-top: 1.75rem;
  font-size: 0.8125rem;
  color: var(--ink-2);
}

.plan-limits {
  display: grid;
  gap: 0.375rem;
  margin-top: 0.625rem;
  padding: 1rem 1.125rem;
  border-radius: 14px;
  background: var(--paper);
  font-size: 0.9375rem;
}

.plan-limits strong {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.plan-list {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0 2.25rem;
  font-size: 0.9375rem;
}

.plan-list li {
  display: flex;
  gap: 0.625rem;
}

.plan-list svg {
  width: 18px;
  height: 18px;
  margin-top: 0.15em;
  color: var(--accent);
}

.plan-list .includes {
  font-weight: 600;
}

.plan .btn {
  margin-top: auto;
}

.fine-print {
  display: grid;
  gap: 0.375rem;
  max-width: 68ch;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--ink-2);
}
