/* Saldo — light, minimal, monochrome. Shared by all pages. */

:root {
  --bg: #fbfbf9;
  --panel: #ffffff;
  --panel-2: #f3f4f1;
  --ink: #16171a;
  --muted: #62656c;
  --faint: #8b8e95;
  --line: #e2e2db;
  --accent: #16171a;                 /* monochrome: emphasis = ink */
  --accent-soft: rgba(22, 23, 26, 0.05);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wide: 1080px;
  --narrow: 700px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 28px; }
.wrap.narrow { max-width: var(--narrow); }

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 3px; }

/* full-width footer, pinned to the bottom on tall screens */
.site-foot { border-top: 1px solid var(--line); margin-top: auto; }
.site-foot .wrap { display: flex; justify-content: space-between; align-items: center; gap: 14px 24px; flex-wrap: wrap; padding-top: 26px; padding-bottom: 40px; }
.foot-brand { font-weight: 600; font-size: 1.05rem; letter-spacing: -0.02em; color: var(--ink); }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; font-size: 0.85rem; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--ink); text-decoration: none; }

/* ---------- header ---------- */
header.site { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 24px 0; }
.wordmark { font-weight: 600; font-size: 1.15rem; letter-spacing: -0.02em; color: var(--ink); }
.wordmark:hover { text-decoration: none; }
header.site nav { display: flex; gap: 26px; align-items: center; font-size: 0.94rem; }
.navlink { color: var(--muted); }
.navlink:hover { color: var(--ink); text-decoration: none; }
.navlink[aria-current="page"] { color: var(--ink); }
header.site nav a.btn { color: var(--bg); }
header.site nav a.btn:hover { color: var(--bg); }

/* mobile dropdown menu (hidden on desktop) */
.menu-btn { display: none; align-items: center; justify-content: center; width: 40px; height: 38px; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); cursor: pointer; color: var(--ink); }
.menu-btn svg { width: 20px; height: 20px; }
.menu-panel { display: none; position: absolute; top: calc(100% + 6px); right: 0; min-width: 190px; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px; box-shadow: 0 20px 44px -22px rgba(22,23,26,0.3); z-index: 30; }
.menu-panel a { padding: 11px 12px; border-radius: 8px; color: var(--ink); font-size: 0.98rem; }
.menu-panel a:hover { background: var(--panel-2); text-decoration: none; }
.menu-panel.open { display: flex; }

/* ---------- type ---------- */
h1 {
  font-weight: 600;
  font-size: clamp(2.6rem, 6.4vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 20px;
  text-wrap: balance;
}
h2 {
  font-weight: 600;
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
  text-wrap: balance;
}
h3 { font-size: 1.05rem; letter-spacing: -0.01em; margin: 0 0 8px; font-weight: 600; }
.lede { font-size: 1.08rem; color: var(--muted); margin: 0 0 28px; text-wrap: pretty; }
.lede strong { color: var(--ink); font-weight: 600; }
p { text-wrap: pretty; }
.muted { color: var(--muted); }
.eyebrow { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; }

/* ---------- buttons + links ---------- */
.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--bg);
  font-weight: 550;
  font-size: 0.97rem;
  padding: 12px 22px;
  border-radius: 9px;
  border: 1px solid var(--ink);
}
.btn:hover { background: #000; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--panel); border-color: var(--faint); }
.btn.sm { padding: 9px 16px; font-size: 0.9rem; }
.cta-row { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.link { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--faint); font-size: 0.97rem; }
.link:hover { text-decoration-color: var(--ink); }
.only-sm { display: none; }

/* ---------- sections ---------- */
section { padding: 44px 0; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: start; padding: 64px 0 48px; }
.hero .side { padding-top: 8px; }
.hero .side p { font-size: 1.05rem; color: var(--muted); margin: 0 0 24px; }
.hero .side p strong { color: var(--ink); font-weight: 600; }

/* ---------- demo: chat left, use cases right ---------- */
/* same grid as the hero, so the chat lines up under the headline and the
   use-case cards line up under the intro text */
.demo { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: start; padding: 56px 0 100px; }
.chat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 16px 18px;
  box-shadow: 0 26px 60px -34px rgba(22, 23, 26, 0.24);
}
.chat-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 13px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.chat-head .dots { display: flex; gap: 6px; }
.chat-head .dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.chat-head .who { font-family: var(--mono); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); }
.chat-log { display: flex; flex-direction: column; gap: 10px; min-height: 150px; }
.bubble { max-width: 88%; padding: 10px 14px; border-radius: 14px; font-size: 0.92rem; line-height: 1.45; animation: pop .3s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(5px); } }
.bubble.user { align-self: flex-end; background: var(--ink); color: var(--bg); border-bottom-right-radius: 4px; }
.bubble.bot { align-self: flex-start; background: var(--panel-2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.bubble .num { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .bubble { animation: none; } }

/* use-case cards (vertical, beside the chat) */
.templates { display: flex; flex-direction: column; gap: 10px; }
.tmpl {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  padding: 13px 14px;
  cursor: pointer;
  text-align: left;
  font-family: var(--sans);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.tmpl:hover { border-color: var(--faint); }
.tmpl.active { border-color: var(--ink); background: var(--panel); box-shadow: 0 10px 26px -18px rgba(22, 23, 26, 0.35); }
.tmpl .ic { flex: none; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.tmpl.active .ic { border-color: var(--ink); color: var(--ink); }
.tmpl .ic svg { width: 18px; height: 18px; }
.tmpl .txt { display: flex; flex-direction: column; line-height: 1.25; }
.tmpl .t { font-weight: 600; font-size: 0.92rem; color: var(--ink); }
.tmpl .d { font-size: 0.78rem; color: var(--muted); }

/* ---------- cards / pricing ---------- */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: stretch; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; }
.card.accent { border-color: var(--ink); }
.card .tag { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 14px; }
.card .price { font-size: 2rem; font-weight: 600; letter-spacing: -0.03em; margin: 2px 0 4px; }
.card .price small { font-size: 1rem; color: var(--muted); font-weight: 400; }
.card .per { font-size: 0.85rem; color: var(--muted); margin: 0 0 20px; }
.card ul { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 9px; font-size: 0.93rem; color: var(--muted); }
.card ul li::before { content: "—"; color: var(--ink); margin-right: 9px; }
.card .btn { margin-top: auto; text-align: center; }

/* ---------- how-it-works diagram (responsive) ---------- */
.diagram { display: flex; flex-direction: column; gap: 22px; margin: 8px 0 10px; }
.plane-tag { display: block; font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin-bottom: 12px; }
.plane-flow { display: flex; align-items: stretch; gap: 0; }
.node { flex: 1; display: flex; flex-direction: column; justify-content: center; border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 13px 16px; font-size: 0.9rem; }
.node.you { border-color: var(--ink); }
.node .sub { display: block; color: var(--muted); font-size: 0.78rem; margin-top: 2px; }
.conn { flex: 0 0 auto; width: 150px; display: flex; align-items: center; justify-content: center; position: relative; }
.conn::before { content: ""; position: absolute; top: 50%; left: 8px; right: 8px; border-top: 1px dashed var(--line); }
.conn span { position: relative; z-index: 1; background: var(--bg); padding: 3px 8px; font-family: var(--mono); font-size: 0.65rem; color: var(--muted); text-align: center; line-height: 1.3; }
.flow-note { display: grid; grid-template-columns: 120px 1fr; gap: 16px; margin-top: 8px; }
.flow-note .k { text-align: right; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.flow-note p { margin: 0; font-size: 0.95rem; color: var(--muted); }

/* prose (technical page) */
.prose h2 { margin-top: 46px; }
.prose h3 { margin-top: 28px; }
.prose p { color: #35373c; }
.prose ul { color: #35373c; padding-left: 1.1em; }
.prose li { margin: 6px 0; }
.prose a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--faint); }
.prose code, .tools code { font-family: var(--mono); font-size: 0.88em; background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; color: var(--ink); }
.backlink { font-family: var(--mono); font-size: 0.8rem; }
.tools { display: flex; flex-wrap: wrap; gap: 8px; }
.tools code { border-radius: 100px; padding: 6px 14px; }

/* ---------- responsive ---------- */
@media (max-width: 820px) {
  .wrap { padding: 0 20px; }
  .hero { grid-template-columns: 1fr; gap: 12px; padding: 30px 0 14px; }
  .hero .side { padding-top: 0; }
  .demo { grid-template-columns: 1fr; gap: 20px; padding: 26px 0 56px; }
  .cards { grid-template-columns: 1fr; }

  /* header: swap inline links for a dropdown menu */
  header.site { padding: 18px 0; }
  header.site nav { gap: 10px; }
  .navlink { display: none; }
  .menu-btn { display: inline-flex; }

  /* diagram: connector goes vertical */
  .plane-flow { flex-direction: column; align-items: stretch; }
  .conn { width: auto; height: 42px; }
  .conn::before { top: 8px; bottom: 8px; left: 50%; right: auto; border-top: 0; border-left: 1px dashed var(--line); }
  .flow-note { grid-template-columns: 1fr; gap: 4px; }
  .flow-note .k { text-align: left; }

  /* responsive text toggles */
  .only-lg { display: none !important; }
  .only-sm { display: inline; }

  /* footer: stacked with a clean link list */
  .site-foot .wrap { flex-direction: column; align-items: flex-start; gap: 16px; padding-top: 24px; padding-bottom: 34px; }
  .foot-links { flex-direction: column; gap: 12px; }
}

@media (max-width: 400px) {
  h1 { font-size: 2.3rem; }
}
