/* Counter — landing page + demo widget. No frameworks. */

:root {
  --paper: #f6f3ee;
  --paper-2: #efeae2;
  --ink: #1c1a17;
  --ink-2: #4a4640;
  --ink-3: #6f6a62;
  --line: #d9d3c8;
  --green: #1f5f4f;
  --green-deep: #174a3e;
  --green-soft: #e3ece7;
  --brass: #b98a3b;
  --cream: #fbf9f5;
  --panel: #171b1a;
  --panel-2: #212827;
  --panel-line: #303837;
  --serif: Charter, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

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

h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.012em; line-height: 1.12; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h1 em { font-style: italic; color: var(--green); }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
a { color: var(--green); text-underline-offset: 0.15em; }
a:hover { color: var(--green-deep); }
ul, ol { padding-left: 1.2em; }
.muted { color: var(--ink-3); }
.small { font-size: 0.9rem; }

:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; border-radius: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 12px; }

.wrap { width: min(var(--max), 100% - 2.5rem); margin-inline: auto; }
.narrow { max-width: 680px; }

/* Buttons */
.btn {
  display: inline-block; background: var(--green); color: var(--cream); text-decoration: none;
  font-weight: 600; padding: 0.8em 1.25em; border-radius: 10px; border: 1px solid var(--green-deep);
  transition: background 120ms ease, transform 120ms ease;
}
.btn:hover { background: var(--green-deep); color: var(--cream); }
.btn:active { transform: translateY(1px); }
.btn-small { padding: 0.55em 0.95em; font-size: 0.95rem; }
.btn-large { font-size: 1.1rem; padding: 0.95em 1.6em; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-size: 1.35rem; font-weight: 600; }
.brand-mark { width: 30px; height: 30px; color: var(--green); }
.nav nav { display: flex; align-items: center; gap: 1.4rem; }
.nav nav > a:not(.btn) { color: var(--ink-2); text-decoration: none; font-weight: 500; }
.nav nav > a:not(.btn):hover { color: var(--ink); }
@media (max-width: 560px) { .nav nav > a:not(.btn) { display: none; } }

/* Hero */
.hero { padding: clamp(2rem, 6vw, 5rem) 0 clamp(2rem, 5vw, 4rem); }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 2.2rem; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 4rem; } }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--ink-2); max-width: 34em; }
.hero-note { color: var(--ink-3); }
.hero-try { font-family: var(--serif); font-style: italic; color: var(--ink-3); margin-top: 2rem; display: none; align-items: center; gap: 10px; }
.hero-arrow { display: inline-block; width: 42px; height: 1px; background: var(--ink-3); position: relative; }
.hero-arrow::after { content: ""; position: absolute; right: -1px; top: -4px; width: 8px; height: 8px; border-top: 1px solid var(--ink-3); border-right: 1px solid var(--ink-3); transform: rotate(45deg); }
@media (min-width: 900px) { .hero-try { display: inline-flex; } }
.demo-caption { text-align: center; color: var(--ink-3); font-family: var(--serif); font-style: italic; margin: 0.9rem 0 0; }

/* ---------- The widget ---------- */
.cc {
  display: flex; flex-direction: column;
  height: min(600px, 78vh); min-height: 480px;
  background: var(--panel); color: var(--cream);
  border-radius: 22px; border: 1px solid var(--panel-line);
  box-shadow: 0 30px 60px -30px rgba(20, 24, 22, 0.55), 0 2px 0 rgba(255,255,255,0.03) inset;
  overflow: hidden;
}
.cc-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--panel-line); background: var(--panel-2); }
.cc-dot { width: 10px; height: 10px; border-radius: 50%; background: #58d38b; box-shadow: 0 0 0 4px rgba(88, 211, 139, 0.18); flex: none; }
.cc-head-text { flex: 1; min-width: 0; }
.cc-role { margin: 0; font-weight: 600; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-sub { margin: 0; font-size: 0.8rem; color: #a7b0ad; }
.cc-reset { background: transparent; color: #cfd6d3; border: 1px solid var(--panel-line); border-radius: 999px; padding: 6px 11px; font: inherit; font-size: 0.8rem; cursor: pointer; }
.cc-reset:hover { border-color: #5a6462; color: var(--cream); }

.cc-log { flex: 1; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; scrollbar-color: #3b4442 transparent; }
.cc-msg { display: flex; }
.cc-assistant { justify-content: flex-start; }
.cc-user { justify-content: flex-end; }
.cc-bubble {
  max-width: 86%; padding: 11px 14px; border-radius: 18px; font-size: 0.98rem; line-height: 1.45; overflow-wrap: anywhere;
  animation: cc-in 220ms ease-out;
}
.cc-assistant .cc-bubble { background: var(--cream); color: var(--ink); border-bottom-left-radius: 6px; }
.cc-user .cc-bubble { background: var(--green); color: var(--cream); border-bottom-right-radius: 6px; }
@keyframes cc-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.cc-typing { display: inline-flex; gap: 5px; align-items: center; padding: 14px 16px; }
.cc-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: cc-blink 1.1s infinite ease-in-out; }
.cc-typing span:nth-child(2) { animation-delay: 0.15s; }
.cc-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes cc-blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

.cc-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 0 6px 4px; }
.cc-chip {
  background: transparent; color: var(--cream); border: 1px solid #4a5452; border-radius: 999px;
  padding: 8px 13px; font: inherit; font-size: 0.92rem; cursor: pointer; transition: background 120ms ease, border-color 120ms ease;
}
.cc-chip:hover { background: #2a3230; border-color: #6b7573; }
.cc-starters .cc-chip { border-style: dashed; color: #d7ddda; }

.cc-cta {
  display: inline-block; margin-top: 8px; background: var(--green); color: var(--cream); text-decoration: none;
  font-weight: 600; padding: 9px 13px; border-radius: 10px;
}
.cc-cta:hover { background: var(--green-deep); color: var(--cream); }

.cc-status { margin: 0; padding: 0 18px 6px; font-size: 0.82rem; color: #a7b0ad; font-style: italic; }

.cc-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px 12px; border-top: 1px solid var(--panel-line); background: var(--panel-2); }
.cc-input {
  flex: 1; resize: none; min-height: 44px; max-height: 120px; padding: 11px 14px; border-radius: 14px;
  border: 1px solid #3b4442; background: #0f1312; color: var(--cream); font: inherit; font-size: 1rem; line-height: 1.35;
}
.cc-input::placeholder { color: #7e8785; }
.cc-input:focus-visible { outline: 2px solid #58d38b; outline-offset: 0; border-color: transparent; }
.cc-send {
  flex: none; width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--green); color: var(--cream);
  display: inline-grid; place-items: center; cursor: pointer;
}
.cc-send:hover { background: #27725f; }
.cc-send:disabled, .cc-input:disabled { opacity: 0.6; cursor: default; }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; border-top: 1px solid var(--line); }
.problem { background: var(--paper-2); }
.problem p { font-size: 1.08rem; color: var(--ink-2); }

.two-col { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1.2fr 0.8fr; gap: 4rem; } }
.checklist { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.checklist li { position: relative; padding-left: 1.8rem; margin-bottom: 0.9rem; color: var(--ink-2); }
.checklist li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 12px; height: 7px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }
.checklist strong { color: var(--ink); font-weight: 600; }
.works-with { background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; align-self: start; }
.works-with h3 { font-size: 1.15rem; }
.platforms { list-style: none; padding: 0; margin: 0.8rem 0 1rem; display: flex; flex-wrap: wrap; gap: 8px; }
.platforms li { border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 6px 10px; font-size: 0.92rem; color: var(--ink-2); }

.steps { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1.5rem; grid-template-columns: 1fr; counter-reset: step; }
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; } }
.steps li { border-top: 2px solid var(--ink); padding-top: 1rem; }
.step-num { font-family: var(--serif); font-size: 2rem; color: var(--brass); line-height: 1; display: block; margin-bottom: 0.5rem; }
.steps h3 { font-size: 1.2rem; }
.steps p { color: var(--ink-2); margin: 0; }

.who p { font-size: 1.08rem; color: var(--ink-2); }

/* Pricing */
.plans { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-top: 1.5rem; }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; gap: 1.5rem; } }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; background: var(--cream); }
.plan-featured { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.plan h3 { font-size: 1.6rem; margin-bottom: 0.1em; }
.plan-for { color: var(--ink-3); margin-bottom: 1.2rem; }
.plan-featured .plan-for { color: #b8b2a8; }
.price { margin: 0; line-height: 1; }
.amount { font-family: var(--serif); font-size: 3rem; font-weight: 500; letter-spacing: -0.02em; }
.per { font-size: 1rem; color: var(--ink-3); margin-left: 4px; }
.plan-featured .per { color: #b8b2a8; }
.plan-setup { margin: 0.6rem 0 1.2rem; color: var(--ink-2); font-weight: 500; }
.plan-featured .plan-setup { color: #e6e1d8; }
.plan ul { margin: 0; padding-left: 1.1em; color: var(--ink-2); }
.plan-featured ul { color: #e6e1d8; }
.plan li { margin-bottom: 0.4rem; }
.plan-notes { margin-top: 1.75rem; color: var(--ink-2); max-width: 760px; }
.talk { display: flex; flex-wrap: wrap; gap: 0.7rem 1rem; align-items: center; font-family: var(--serif); font-size: 1.15rem; }

/* FAQ */
.faq details { border-top: 1px solid var(--line); padding: 0.9rem 0; }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-family: var(--serif); font-size: 1.2rem; font-weight: 500; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); color: var(--ink-3); font-size: 1.4rem; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0.7rem 0 0; color: var(--ink-2); max-width: 60ch; }

.final { background: var(--paper-2); text-align: center; }
.final .narrow { margin-inline: auto; }
.final p { color: var(--ink-2); }

.footer { border-top: 1px solid var(--line); padding: 2.5rem 0 3rem; color: var(--ink-2); }
.footer-inner p { margin: 0 0 0.4rem; }
