/* simline.dev — Astryx neutral theme with the Simline palette.
   Radii: 10px controls, 12px cards, 28px page surfaces. Amber is reserved for AI moments. */

:root {
  --evergreen: #12513f;
  --evergreen-hover: #0d3f31;
  --lichen: #dcebe4;
  --snow: #eef2f0;
  --ink: #0f1613;
  --ink-2: #47524d;
  --ink-3: #5f6a65;
  --surface: #ffffff;
  --surface-2: #f6f8f7;
  --line: #dde3e0;
  --line-strong: #c6cfcb;
  --amber: #f2b441;
  --amber-tint: #fdf3df;
  --amber-ink: #5c3f00;
  --danger: #a1281c;

  --r-control: 10px;
  --r-card: 12px;
  --r-surface: 28px;
  --shadow: 0 1px 2px rgb(15 22 19 / 0.04), 0 4px 16px rgb(15 22 19 / 0.04);
  --font: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(16px, 4vw, 32px);
  --max: 1120px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--snow);
  color: var(--ink);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--evergreen); text-underline-offset: 3px; }
a:hover { color: var(--evergreen-hover); }
:focus-visible { outline: 3px solid var(--evergreen); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.5em; font-weight: 700; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.25rem); }
h3 { font-size: 1.1rem; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
code, pre { font-family: var(--mono); font-size: 0.875em; }
.skip { position: absolute; left: -9999px; top: 8px; }
.skip:focus { left: 8px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: var(--r-control); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ── Header ─────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 5; background: rgb(238 242 240 / 0.88); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; }
.site-header .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.mark { width: 32px; height: 32px; border-radius: 9px; background: var(--evergreen); color: #fff; display: grid; place-items: center; flex: none; }
.mark svg { width: 20px; height: 20px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 0.95rem; padding: 8px 12px; border-radius: var(--r-control); }
.nav a:hover { background: var(--surface); color: var(--ink); }
.nav a.btn { color: #fff; }
@media (max-width: 720px) { .nav a:not(.btn) { display: none; } }

/* ── Buttons & controls ─────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: var(--r-control);
  font: 600 0.975rem/1.2 var(--font); text-decoration: none; cursor: pointer;
  border: 1px solid var(--evergreen); background: var(--evergreen); color: #fff;
  transition: background 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--evergreen-hover); border-color: var(--evergreen-hover); color: #fff; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn.secondary:hover { background: var(--surface-2); color: var(--ink); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.nav .btn { min-height: 40px; padding: 8px 14px; }

label { display: block; font-weight: 600; font-size: 0.925rem; margin-bottom: 6px; }
.hint { color: var(--ink-3); font-size: 0.875rem; font-weight: 400; }
input[type="email"], input[type="text"], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--r-control);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: 400 1rem/1.4 var(--font);
}
textarea { min-height: 96px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--lichen); border-color: var(--evergreen); outline-offset: 0; }
.field { margin-bottom: 16px; }
fieldset { border: 0; padding: 0; margin: 0 0 16px; }
legend { font-weight: 600; font-size: 0.925rem; margin-bottom: 8px; padding: 0; }
.choice { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--surface); margin-bottom: 8px; cursor: pointer; }
.choice input { margin-top: 4px; accent-color: var(--evergreen); width: 18px; height: 18px; flex: none; }
.form-status { margin: 12px 0 0; font-weight: 500; min-height: 1.6em; }
.form-status[data-state="ok"] { color: var(--evergreen); }
.form-status[data-state="error"] { color: var(--danger); }
.turnstile { min-height: 65px; margin-bottom: 12px; }

/* ── Surfaces ───────────────────────────────────────────── */
.surface { background: var(--surface); border-radius: var(--r-surface); padding: clamp(24px, 5vw, 56px); box-shadow: var(--shadow); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; }
.card.muted { background: var(--surface-2); }
section { padding: clamp(40px, 7vw, 72px) 0; }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--evergreen); margin-bottom: 12px; }
.lede { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ink-2); max-width: 40rem; }
.grid { display: grid; gap: 16px; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.four { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; gap: clamp(24px, 4vw, 48px); }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--lichen); color: var(--evergreen); }
.pill.ai { background: var(--amber-tint); color: var(--amber-ink); }
.pill.soon { background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ── Hero ───────────────────────────────────────────────── */
.hero { padding-top: clamp(32px, 6vw, 72px); }
.hero .grid.two { align-items: center; }
.hero h1 { max-width: 14ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 16px; }
.hero-note { color: var(--ink-3); font-size: 0.925rem; }

/* Conversation mock: an agent tool call (amber) leaving through the user's phone (evergreen). */
.demo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.demo .card { box-shadow: var(--shadow); }
.demo-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; font-size: 0.875rem; color: var(--ink-3); }
.tool { border-left: 3px solid var(--amber); }
.tool pre { margin: 0; background: var(--surface-2); padding: 12px; border-radius: var(--r-control); overflow-x: auto; white-space: pre; color: var(--ink); line-height: 1.5; }
.thread { display: grid; gap: 8px; }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 16px; font-size: 0.95rem; line-height: 1.45; }
.bubble.out { justify-self: end; background: var(--evergreen); color: #fff; border-bottom-right-radius: 6px; }
.bubble.in { justify-self: start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.meta { font-size: 0.8rem; color: var(--ink-3); justify-self: end; }
.meta.in { justify-self: start; }

/* ── Steps ──────────────────────────────────────────────── */
.steps { counter-reset: step; }
.step { position: relative; padding-top: 52px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: 20px; left: 20px; width: 28px; height: 28px; border-radius: 8px; background: var(--lichen); color: var(--evergreen); font-weight: 700; display: grid; place-items: center; font-size: 0.9rem; }
.step p { color: var(--ink-2); margin: 0; }
#api { margin-top: clamp(32px, 5vw, 56px); align-items: center; }

/* ── AI section ─────────────────────────────────────────── */
.ai { border: 1px solid var(--line); }
.ai .eyebrow { color: var(--amber-ink); }
.ai ul { padding-left: 1.1em; color: var(--ink-2); }
.ai li { margin-bottom: 6px; }
.codeblock { background: var(--ink); color: #e6ece9; border-radius: var(--r-card); padding: 16px; overflow-x: auto; line-height: 1.55; margin: 0; }
.codeblock .k { color: var(--amber); }
.codeblock .s { color: #a9d8c2; }

/* ── Integrations, limits ───────────────────────────────── */
/* Grid children may hold wide code; let them shrink instead of widening the page. */
.grid > * { min-width: 0; }
.integration { display: flex; flex-direction: column; gap: 6px; }
.integration .pill { align-self: flex-start; }
@media (max-width: 520px) {
  .grid.four { grid-template-columns: 1fr 1fr; gap: 12px; }
  .grid.four .card { padding: 14px; }
  .integration p { font-size: 0.9rem; }
}
.integration h3 { margin: 0; }
.integration p { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.limits li { margin-bottom: 10px; }
.limits { padding-left: 1.1em; color: var(--ink-2); }
.limits strong { color: var(--ink); }

/* ── Prose pages (privacy, delete-account) ──────────────── */
.page { padding: clamp(24px, 5vw, 48px) 0 clamp(40px, 7vw, 72px); }
.prose { max-width: 46rem; }
.prose h1 { font-size: clamp(2rem, 4.5vw, 2.75rem); }
.prose h2 { font-size: 1.4rem; margin-top: 2em; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 600; }
.table-scroll { overflow-x: auto; }
.updated { color: var(--ink-3); font-size: 0.925rem; }
.callout { background: var(--lichen); border-radius: var(--r-card); padding: 16px 20px; margin: 0 0 1.5em; }
.callout p:last-child { margin-bottom: 0; }
.disclosure { display: grid; gap: 12px; margin: 0 0 1.5em; }
.disclosure .card h3 { margin: 0 0 4px; font-size: 1rem; }
.disclosure .card p { margin: 0; color: var(--ink-2); }
.placeholder { background: var(--amber-tint); color: var(--amber-ink); border: 1px dashed #d79a22; border-radius: 6px; padding: 1px 6px; font-family: var(--mono); font-size: 0.85em; word-break: break-all; }
.checksum { display: block; padding: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-control); word-break: break-all; }
.code-display { font: 700 clamp(2rem, 9vw, 3rem)/1 var(--mono); letter-spacing: 0.15em; padding: 16px 20px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-card); display: inline-block; margin: 0 0 1em; }
.badge-slot { display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 18px; border: 1px dashed var(--line-strong); border-radius: var(--r-control); color: var(--ink-3); background: var(--surface-2); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--ink-3); font-size: 0.925rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--ink-2); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
