/* Cald: visual language modelled on twain.ai: near-white canvas, ink text,
   tight tracking, small type, pill buttons, soft periwinkle accents. */
:root {
  --bg: #fcfcfc;
  --surface: #ffffff;
  --ink: hsl(220, 13%, 10%);
  --muted: hsl(220, 8%, 42%);
  --line: #e3e6e8;
  --tint: #f5f5fc;
  --tint-2: #c3cee9;
  --accent: #275ece;
  --accent-ink: #143b71;
  --radius: 16px;
  --pad-x: 20px;
  --max: 1160px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: hsl(220, 13%, 8%);
    --surface: hsl(220, 12%, 11%);
    --ink: hsl(180, 8%, 97%);
    --muted: hsl(210, 8%, 66%);
    --line: hsl(220, 10%, 20%);
    --tint: hsl(224, 20%, 15%);
    --tint-2: #3a4a73;
    --accent: #8fb0ff;
    --accent-ink: #c3cee9;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", "Graphik", "Open Sans", Arial, sans-serif;
  font-size: 15px;
  line-height: 22px;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; letter-spacing: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad-x); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 999px;
  font-weight: 500; font-size: 14px; line-height: 24px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-ghost { border-color: var(--line); background: var(--surface); }
.btn-ghost:hover { border-color: var(--tint-2); }
.btn-lg { padding: 13px 26px; font-size: 15px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.nav.scrolled { border-color: var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.logo img { display: block; width: 100px; height: 50px; object-fit: contain; transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.logo:focus-visible img { transform: translateY(-2px) rotate(-3deg) scale(1.06); }
@media (hover: hover) {
  .logo:hover img { transform: translateY(-2px) rotate(-3deg) scale(1.06); }
}
.nav-links { display: flex; gap: 28px; font-size: 14px; color: var(--muted); }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.menu-btn { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.menu-btn span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 5px 0; transition: transform .2s, opacity .2s; }

/* ---------- Hero ---------- */
.hero { padding: 96px 0 72px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px; background: var(--tint);
  font-size: 13px; color: var(--accent-ink); margin-bottom: 28px;
}
.eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero h1 {
  font-size: clamp(40px, 7vw, 84px); line-height: 1.02; font-weight: 700;
  letter-spacing: -0.045em; max-width: 14ch; margin: 0 auto;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lead { max-width: 560px; margin: 28px auto 36px; font-size: 18px; line-height: 28px; color: var(--muted); }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 13px; color: var(--muted); }

/* ---------- Stack strip ---------- */
.strip { padding: 28px 0 8px; }
.strip-label { text-align: center; font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.strip-list {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 36px;
  list-style: none; margin: 0; padding: 0;
  font-size: 17px; font-weight: 500; letter-spacing: -0.03em; color: var(--muted);
}
.strip-list li { opacity: .8; }

/* ---------- Section scaffolding ---------- */
section { scroll-margin-top: 72px; }
.section { padding: 104px 0; }
.kicker { font-size: 13px; color: var(--accent); font-weight: 500; margin-bottom: 14px; }
.h2 { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.06; font-weight: 500; letter-spacing: -0.04em; max-width: 18ch; }
.sub { margin-top: 18px; max-width: 540px; color: var(--muted); font-size: 16px; line-height: 25px; }

/* ---------- Statement ---------- */
.statement { padding: 120px 0; text-align: center; background: var(--tint); }
.statement p {
  font-size: clamp(32px, 6vw, 72px); line-height: 1.04; font-weight: 500;
  letter-spacing: -0.045em; max-width: 18ch; margin: 0 auto;
}
.statement p span { color: var(--muted); }

/* ---------- Services ---------- */
.services { display: grid; gap: 14px; margin-top: 56px; grid-template-columns: repeat(3, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 14px; min-height: 260px;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--tint-2); transform: translateY(-2px); }
.card .num { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.card h3 { font-size: 22px; line-height: 26px; font-weight: 500; letter-spacing: -0.03em; }
.card p { color: var(--muted); }
.tags { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; padding-top: 6px; }
.tags span { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--tint); color: var(--accent-ink); }

/* ---------- Numbers / about ---------- */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: start; }
.about-text { display: grid; gap: 18px; color: var(--muted); font-size: 16px; line-height: 26px; }
.about-text strong { color: var(--ink); font-weight: 500; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 56px; }
.fact { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.fact b { display: block; font-size: 44px; line-height: 1; font-weight: 500; letter-spacing: -0.05em; margin-bottom: 10px; }
.fact span { color: var(--muted); font-size: 14px; }

/* ---------- Rates ---------- */
.rates-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.rates-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; margin-top: 48px; align-items: start; }
.rate-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 8px 8px; margin-bottom: 14px; }
.rate-group h3 { font-size: 17px; line-height: 24px; font-weight: 500; padding: 18px 18px 2px; letter-spacing: -0.02em; }
.rate-group .desc { padding: 0 18px 10px; color: var(--muted); font-size: 13px; }
.rate-row {
  display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-radius: 10px;
  cursor: pointer; transition: background .15s; user-select: none;
}
.rate-row:hover { background: var(--tint); }
.rate-row input { appearance: none; width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--tint-2); margin: 0; display: grid; place-content: center; flex: none; cursor: pointer; transition: background .15s, border-color .15s; }
.rate-row input::after { content: ""; width: 9px; height: 5px; border-left: 2px solid var(--bg); border-bottom: 2px solid var(--bg); transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .12s; }
.rate-row input:checked { background: var(--ink); border-color: var(--ink); }
.rate-row input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.rate-row .name { flex: 1; }
.rate-row .price { font-variant-numeric: tabular-nums; font-weight: 500; }
.calc {
  position: sticky; top: 88px; background: var(--ink); color: var(--bg);
  border-radius: var(--radius); padding: 28px;
}
.calc h3 { font-size: 14px; font-weight: 400; opacity: .7; }
.calc .total { font-size: 52px; line-height: 1.1; font-weight: 500; letter-spacing: -0.05em; margin: 8px 0 4px; font-variant-numeric: tabular-nums; }
.calc ul { list-style: none; margin: 18px 0 22px; padding: 18px 0 0; border-top: 1px solid color-mix(in srgb, var(--bg) 20%, transparent); display: grid; gap: 8px; font-size: 13px; max-height: 220px; overflow: auto; }
.calc li { display: flex; justify-content: space-between; gap: 12px; opacity: .85; }
.calc li.empty { opacity: .55; }
.calc .btn { width: 100%; justify-content: center; background: var(--bg); color: var(--ink); }
.calc small { display: block; margin-top: 14px; opacity: .55; font-size: 12px; line-height: 17px; }

/* ---------- FAQ ---------- */
.faq-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--tint); margin: 36px 0 24px; flex-wrap: wrap; }
.faq-tab { border: 0; background: none; padding: 8px 16px; border-radius: 999px; cursor: pointer; font-size: 14px; color: var(--muted); }
.faq-tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.faq-panel[hidden] { display: none; }
details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; padding: 22px 0; font-size: 18px; font-weight: 500; letter-spacing: -0.025em; line-height: 24px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 22px; line-height: 22px; color: var(--muted); transition: transform .2s; flex: none; }
details[open] summary::after { transform: rotate(45deg); }
details .a { padding: 0 40px 24px 0; color: var(--muted); max-width: 70ch; font-size: 16px; line-height: 25px; }
.faq-list { max-width: 820px; }

/* ---------- CTA ---------- */
.cta { margin: 0 var(--pad-x) 96px; }
.cta-box {
  max-width: var(--max); margin: 0 auto; border-radius: 28px; padding: 88px 24px; text-align: center;
  background: radial-gradient(900px 340px at 50% 0%, var(--tint-2), transparent 70%), var(--tint);
}
.cta-box h2 { font-size: clamp(34px, 5.4vw, 64px); line-height: 1.02; font-weight: 500; letter-spacing: -0.045em; max-width: 14ch; margin: 0 auto 18px; }
.cta-box p { color: var(--muted); font-size: 17px; margin-bottom: 32px; }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--line); padding: 56px 0 40px; }
.foot { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.foot h4 { margin: 0 0 14px; font-size: 13px; font-weight: 500; color: var(--muted); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.foot a:hover { color: var(--accent); }
.foot .tag { color: var(--muted); margin-top: 12px; max-width: 28ch; }
.legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }

/* ---------- Simple pages (404) ---------- */
.center-page { min-height: 70vh; display: grid; place-content: center; text-align: center; gap: 18px; padding: 40px var(--pad-x); }
.center-page h1 { font-size: clamp(64px, 14vw, 160px); line-height: 1; font-weight: 500; letter-spacing: -0.06em; }
.center-page p { color: var(--muted); font-size: 17px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .btn, .card { transition: none; }
  .logo img { transition: none; }
  .logo:hover img, .logo:focus-visible img { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .rates-grid { grid-template-columns: 1fr; }
  .calc { position: static; }
  .about { grid-template-columns: 1fr; gap: 32px; }
  .foot { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .menu-btn { display: block; }
  .nav.open .nav-links {
    display: flex; flex-direction: column; gap: 18px; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg); padding: 20px var(--pad-x) 28px; border-bottom: 1px solid var(--line); font-size: 17px;
  }
  .nav.open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.open .menu-btn span:nth-child(2) { opacity: 0; }
  .nav.open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
@media (max-width: 760px) {
  .hero { padding: 64px 0 48px; }
  .section { padding: 72px 0; }
  .statement { padding: 80px 0; }
  .services, .facts { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  details .a { padding-right: 0; }
}

/* ---------- Cald Bots ---------- */
.bots-hero .kicker { margin-bottom: 20px; }
.nav-links a { position: relative; isolation: isolate; }
.nav-links a::before { content: ''; position: absolute; inset: -7px -11px; z-index: -1; pointer-events: none; border-radius: 999px; opacity: 0; background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: 0 0 20px color-mix(in srgb, var(--accent) 25%, transparent); transition: opacity .2s ease; }
.nav-links a[aria-current="page"], .nav-links a[aria-current="location"] { color: var(--accent); text-shadow: 0 0 12px color-mix(in srgb, var(--accent) 45%, transparent); }
.nav-links a[aria-current="page"]::before, .nav-links a[aria-current="location"]::before { opacity: 1; }
.bot-steps { display: grid; gap: 64px; margin-top: 48px; }
.bot-step { display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; align-items: center; }
.bot-step:nth-child(even) .bot-step-copy { order: 2; }
.bot-step h3 { font-size: clamp(24px, 3vw, 34px); line-height: 1.15; letter-spacing: -.035em; margin: 12px 0 16px; font-weight: 500; }
.bot-step p { color: var(--muted); font-size: 16px; line-height: 26px; }
.bot-step img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 48px rgba(0,0,0,.06); }
.bots-pricing { background: var(--tint); }
.bot-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.bot-plan { display: flex; flex-direction: column; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.bot-plan.featured { border-color: var(--accent); }
.plan-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; min-height: 30px; }
.plan-heading h3 { font-size: 20px; font-weight: 500; }
.plan-badge { background: var(--tint); color: var(--accent); font-size: 11px; padding: 4px 10px; border-radius: 999px; }
.plan-price { font-size: 48px; line-height: 1.2; letter-spacing: -.05em; margin: 24px 0 12px; }
.plan-price span { font-size: 14px; color: var(--muted); letter-spacing: 0; }
.plan-desc { color: var(--muted); }
.bot-plan ul { padding: 24px 0 28px; margin: 0 0 auto; list-style: none; display: grid; gap: 14px; }
.bot-plan li { padding-left: 20px; position: relative; }
.bot-plan li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); }
.bot-plan .btn { justify-content: center; }
.bots-trusted { text-align: center; }
.bot-customers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px; align-items: center; margin-top: 32px; }
.bot-customers img { width: 100%; height: 90px; object-fit: contain; background: #fff; border-radius: 12px; padding: 12px; }
@media (max-width: 980px) {
  .bot-plans { gap: 12px; }
  .bot-plan { padding: 20px; }
  .bot-step { gap: 28px; }
}
@media (max-width: 760px) {
  .bot-step, .bot-plans { grid-template-columns: 1fr; }
  .bot-step:nth-child(even) .bot-step-copy { order: 0; }
  .bot-customers { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

/* ---------- Cald Bots homepage walkthrough ---------- */
.bots-intro { padding-top: 24px; }
.bots-walkthrough-heading { position: sticky; top: 65px; z-index: 10; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: end; padding: 20px 0; margin-bottom: 36px; background: var(--bg); border-bottom: 1px solid var(--line); }
.bots-walkthrough-heading .sub { margin: 0 0 24px; }
.bots-free-note { display: block; margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 20px; }
.bots-walkthrough { background: var(--tint); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.bots-step-tabs { display: grid; grid-template-columns: repeat(4, 1fr); padding: 12px; gap: 8px; border-bottom: 1px solid var(--line); }
.bots-step-tabs button { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px 10px; background: transparent; border: 1px solid transparent; border-radius: 12px; cursor: pointer; color: var(--muted); }
.bots-step-tabs button span { font-size: 12px; opacity: .6; }
.bots-step-tabs button[aria-selected="true"] { background: var(--surface); color: var(--accent); border-color: var(--line); box-shadow: 0 3px 12px #00000008; }
.bots-slide { display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; align-items: center; padding: 40px; }
.bots-slide[hidden] { display: none; }
.bots-slide-copy h3 { font-size: clamp(24px, 3vw, 36px); line-height: 1.1; letter-spacing: -.035em; font-weight: 500; margin-bottom: 20px; }
.bots-slide-copy > p:not(.kicker) { color: var(--muted); font-size: 16px; line-height: 26px; }
.bots-slide-image { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 16px 40px #00000010; }
.bots-slide-image img { width: 100%; height: auto; aspect-ratio: 1.9; object-fit: contain; }
.bots-walkthrough.is-ready .bots-slide:not([hidden]) { animation: bots-slide-in .35s ease both; }
.bots-slide-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 40px 28px; color: var(--muted); font-size: 12px; }
.bots-slide-controls > div { display: flex; gap: 8px; }
.bots-slide-controls button { border: 1px solid var(--line); border-radius: 50%; background: var(--surface); width: 40px; height: 40px; cursor: pointer; font-size: 20px; }
.bots-slide-controls button:disabled { opacity: .3; cursor: default; }
.bots-plans-module { margin-top: 48px; }
.bots-plans-module > h3 { font-size: 30px; line-height: 1.2; font-weight: 500; letter-spacing: -.03em; }
.bots-plans-module .bot-plans { margin: 28px 0 0; }
@keyframes bots-slide-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) {
 .bots-walkthrough-heading { grid-template-columns: 1fr 1fr; gap: 16px; align-items: center; padding: 16px 0; }
 .bots-walkthrough-heading .h2 { font-size: 25px; line-height: 1.08; }
 .bots-walkthrough-heading .kicker { margin-bottom: 8px; }
 .bots-walkthrough-heading .btn { padding: 9px 14px; font-size: 13px; }
 .bots-walkthrough-heading .bots-free-note { font-size: 11px; line-height: 16px; }
 .bots-step-tabs { padding: 8px; gap: 4px; }
 .bots-step-tabs button { flex-direction: column; gap: 3px; font-size: 12px; padding: 10px 4px; }
 .bots-slide { grid-template-columns: 1fr; gap: 24px; padding: 24px; }
 .bots-slide-copy { min-height: 200px; }
 .bots-slide-controls { padding: 0 24px 24px; }
 .bots-free-note { display: block; margin: 12px 0 0; }
}
@media (prefers-reduced-motion: reduce) { .bots-walkthrough.is-ready .bots-slide:not([hidden]) { animation: none; } }

#bots-pricing-heading { scroll-margin-top: 290px; }

/* About uses the standard section width and retains the heading/body hierarchy. */
.about.about-wide { display: block; }
.about-wide .about-text { margin-top: 32px; }

.faq-list .a ul { margin: 14px 0 0; padding-left: 22px; }
.faq-list .a li + li { margin-top: 8px; }
