/* Cocoon site theme — tokens mirror src/ui/theme.css and docs/BRAND.md. */

:root {
  --ink: #20264a;
  --muted: #5a6180;
  --bg: #f4f5fc;
  --surface: #ffffff;
  --border: #dcdff0;
  --accent: #3b4ac4;
  --accent-soft: #eef1fe;
  --accent-soft-border: #c7cdf4;
  --grad-a: #636efa;
  --grad-b: #33c9c0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e7e9f8;
    --muted: #a3a9c9;
    --bg: #171a2f;
    --surface: #20243d;
    --border: #343a5c;
    --accent: #8d96ff;
    --accent-soft: #272c4d;
    --accent-soft-border: #3d4470;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 15% -10%, rgba(99, 110, 250, 0.12), transparent 60%),
    radial-gradient(900px 600px at 95% 5%, rgba(51, 201, 192, 0.10), transparent 55%),
    var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

main {
  max-width: 920px;
  margin: 0 auto;
  padding: 40px 16px 64px;
}

header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

header img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
}

h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.subtitle {
  margin: 4px 0 0;
  color: var(--muted);
}

/*
 * The signature: one silk thread. It marks the masthead as a short stub, and
 * the same 2px thread reappears as each section's left rail — so the brand
 * element does structural work rather than decorating. A full-width bar here
 * competed with the rails and read as a plain underline.
 */
.brand-rule {
  width: 44px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--grad-a), var(--grad-b));
  margin: 14px 0 22px;
}

nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0 18px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/*
 * Sections hang off a thread rail instead of sitting in bordered boxes. The
 * audience is people reducing sensory load: a page of nested rectangles is a
 * page of edges, and separating with space plus one line says the same thing
 * with far less visual noise.
 */
.card {
  position: relative;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 2px 0 2px 20px;
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--grad-a), var(--grad-b));
  opacity: 0.5;
}

.card + .card {
  margin-top: 34px;
}

/* Headings are eyebrows: hierarchy from treatment, not size, so contrast
   stays low while structure stays obvious. */
.card h2 {
  margin: 0 0 14px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.meta {
  font-size: 13px;
  color: var(--muted);
}

code {
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-border);
  padding: 0 6px;
  border-radius: 6px;
  font-size: 0.95em;
}

ul,
ol {
  padding-left: 20px;
}

.pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft-border);
  color: var(--ink);
  font-size: 13px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px 28px;
  margin: 4px 0 10px;
}

.feature {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  padding: 12px 0 0;
}

.feature h3 {
  margin: 0 0 5px;
  font-size: 14.5px;
  font-weight: 600;
}

.feature p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}
