/* Ensō marketing site — shared stylesheet for every page.
   Plain static site: tokens on :root, dark palette via prefers-color-scheme.
   Ink/paper palette from the brand masters (scripts/make-enso-icons.py). */

:root {
  --ink: #1c1917;
  --paper: #faf8f3;
  --card: #ffffff;
  --muted: #6f6a61;
  --rule: #e4dfd4;
  --accent: #1c1917;          /* neutral brand: ink doubles as the accent */
  --accent-contrast: #faf8f3;
  --banner-bg: #ece5d4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ece8e0;
    --paper: #131110;
    --card: #1c1917;
    --muted: #9b958a;
    --rule: #2e2a25;
    --accent: #ece8e0;
    --accent-contrast: #131110;
    --banner-bg: #262119;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
}

.container {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.prose { max-width: 44rem; }

/* ---------- Header ---------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 650;
  font-size: 1.15rem;
  color: inherit;
  text-decoration: none;
}

.enso-mark { width: 1.6rem; height: 1.6rem; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  margin-right: auto;
  font-size: 0.925rem;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.25rem 0;
}

.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }

.auth-buttons { display: flex; gap: 0.5rem; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  padding: 0.5rem 1.05rem;
  border-radius: 0.625rem;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  font-size: 0.925rem;
  font-weight: 550;
  text-decoration: none;
  transition: background 0.15s, opacity 0.15s;
}

.btn:hover { background: var(--card); }

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

.btn-primary:hover { background: var(--accent); opacity: 0.88; }

.btn-lg { padding: 0.7rem 1.5rem; font-size: 1rem; }

/* ---------- Banner ---------- */

.beta-banner {
  background: var(--banner-bg);
  border: 1px solid var(--rule);
  border-radius: 0.625rem;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  text-align: center;
  margin: 1rem 0;
}

/* ---------- Hero ---------- */

.hero {
  text-align: center;
  padding: 4rem 0 3rem;
}

.hero .enso-hero-mark { width: 4.5rem; height: 4.5rem; margin-bottom: 1.25rem; }

.hero h1 {
  font-size: clamp(2rem, 5.5vw, 3.1rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 auto 1rem;
  max-width: 48rem;
}

.hero .sub {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 38rem;
  margin: 0 auto 2rem;
}

.hero .cta-row { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Sections ---------- */

section.band { padding: 3rem 0; }

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

h2.section-title {
  font-size: 1.7rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
}

.section-lede { color: var(--muted); max-width: 40rem; margin: 0 0 2rem; }

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  padding: 1.25rem;
}

.card h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }

.card p { margin: 0; color: var(--muted); font-size: 0.925rem; }

/* ---------- Pricing ---------- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  max-width: 44rem;
  margin: 2rem auto;
}

.price-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 0.75rem;
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
}

.price-card .plan-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  margin-bottom: 0.75rem;
}

.price-card h3 { margin: 0 0 0.25rem; font-size: 1.3rem; }

.price-card .price { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; }

.price-card .price small { font-size: 0.95rem; font-weight: 450; color: var(--muted); }

.price-card .alt-price { color: var(--muted); font-size: 0.9rem; margin: 0.15rem 0 1rem; }

.price-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  font-size: 0.925rem;
}

.price-card li { padding: 0.3rem 0 0.3rem 1.4rem; position: relative; }

.price-card li::before {
  content: "○";
  position: absolute;
  left: 0;
  color: var(--muted);
}

.price-card .btn { margin-top: auto; text-align: center; }

.fineprint { color: var(--muted); font-size: 0.85rem; text-align: center; max-width: 38rem; margin: 1.5rem auto 0; }

/* ---------- FAQ ---------- */

.faq details {
  border: 1px solid var(--rule);
  border-radius: 0.625rem;
  background: var(--card);
  margin-bottom: 0.6rem;
  padding: 0 1.1rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 550;
  padding: 0.85rem 0;
  list-style: none;
  position: relative;
  padding-right: 1.5rem;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.1rem;
  color: var(--muted);
}

.faq details[open] summary::after { content: "–"; }

.faq details p { margin: 0 0 1rem; color: var(--muted); font-size: 0.95rem; }

/* ---------- Page headers (subpages) ---------- */

.page-head { padding: 3rem 0 1rem; }

.page-head h1 { font-size: clamp(1.8rem, 4.5vw, 2.4rem); letter-spacing: -0.015em; margin: 0 0 0.5rem; }

.page-head p { color: var(--muted); max-width: 40rem; margin: 0; }

/* ---------- Docs / getting started ---------- */

.doc-layout { display: grid; grid-template-columns: 14rem 1fr; gap: 2.5rem; padding: 1.5rem 0 3rem; }

.doc-toc {
  position: sticky;
  top: 1.5rem;
  align-self: start;
  font-size: 0.9rem;
}

.doc-toc h2 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.doc-toc ol { list-style: none; margin: 0; padding: 0; }

.doc-toc a {
  display: block;
  padding: 0.25rem 0;
  color: var(--muted);
  text-decoration: none;
}

.doc-toc a:hover { color: var(--ink); }

.doc-body { min-width: 0; max-width: 44rem; }

.doc-body h2 {
  font-size: 1.35rem;
  margin: 2.25rem 0 0.6rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

.doc-body h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.doc-body ol, .doc-body ul { padding-left: 1.3rem; }

.doc-body li { margin: 0.3rem 0; }

.doc-body code {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 0.3rem;
  padding: 0.08rem 0.35rem;
  font-size: 0.875em;
}

.callout {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--muted);
  border-radius: 0.5rem;
  background: var(--card);
  padding: 0.75rem 1rem;
  font-size: 0.925rem;
  color: var(--muted);
  margin: 1rem 0;
}

@media (max-width: 720px) {
  .doc-layout { grid-template-columns: 1fr; gap: 0; }
  .doc-toc { position: static; margin-bottom: 1.5rem; }
}

/* ---------- Download ---------- */

.dl-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 2rem 0; }

/* ---------- Links ---------- */

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }

main a:not(.btn) { text-decoration: underline; text-decoration-color: var(--muted); }

main a:not(.btn):hover { text-decoration-color: var(--ink); }

/* Button that reads as a link — used for the analytics opt-in/out control on
   the privacy page, which has to be a <button> for the analytics.js hook. */

.link-btn {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--muted);
  text-underline-offset: 3px;
}

.link-btn:hover { text-decoration-color: var(--ink); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
  padding: 2rem 0 3rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-brand { display: flex; align-items: center; gap: 0.5rem; color: var(--ink); font-weight: 600; }

.footer-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; list-style: none; margin: 0; padding: 0; }

.footer-links a { color: var(--muted); text-decoration: none; }

.footer-links a:hover { color: var(--ink); }

.footer-meta { flex-basis: 100%; margin-top: 0.5rem; }

.footer-meta a { color: inherit; }
