/* Agent Brain site. Paper and ink with one coral accent; system fonts, no external requests. */
:root {
  --paper: #FBF7F1;
  --paper-2: #F4F1EA;
  --surface: #FFFFFF;
  --ink: #1B1D24;
  --muted: #5E5F68;
  --line: #E6E0D5;
  --accent: #D9481A;      /* text/buttons on light: 4.3:1 on white */
  --accent-ink: #FFFFFF;
  --coral: #FF6B3D;       /* icon coral, decorative only */
  --glow: rgba(255, 107, 61, .16);
  --display: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --body: ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 18px;
  --max: 1120px;
  --prose: 68ch;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121317;
    --paper-2: #16181D;
    --surface: #1B1D23;
    --ink: #F5F3EE;
    --muted: #A9A8AE;
    --line: #2B2D35;
    --accent: #FF7A45;
    --accent-ink: #16181D;
    --glow: rgba(255, 122, 69, .14);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 10; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: 20px; }

/* Header */
.site-header { padding-block: 18px; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 750 18px/1 var(--display); letter-spacing: -.01em; }
.brand img { width: 32px; height: 32px; }
.nav { display: flex; gap: 20px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--paper);
  font: 600 16px/1 var(--body); text-decoration: none;
  padding: 15px 22px; border-radius: 999px;
}
.btn:hover { text-decoration: none; opacity: .92; }
.btn svg { width: 18px; height: 18px; }
.btn-note { font-size: 14px; color: var(--muted); }

/* Hero */
.hero { position: relative; padding-block: 56px 24px; }
.hero::before {
  content: ""; position: absolute; inset: -120px -20% auto; height: 620px; z-index: -1;
  background: radial-gradient(closest-side, var(--glow), transparent);
}
.eyebrow { font: 600 13px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; }
.hero h1 { font-size: clamp(40px, 7.4vw, 80px); line-height: 1.02; font-weight: 800; letter-spacing: -.035em; max-width: 14ch; margin-top: 18px; }
.hero .lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); max-width: 56ch; margin: 22px 0 30px; }
.hero .cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* Screens */
.screens { padding-block: 40px 24px; }
.screens ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.screens li { min-width: 0; }
.screens img { border-radius: 26px; border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 24px 60px -24px rgba(40, 20, 10, .28); }
.screens li:nth-child(2) { transform: translateY(-28px); }
@media (max-width: 760px) {
  .screens ul { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 72%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
  .screens li { scroll-snap-align: center; }
  .screens li:nth-child(2) { transform: none; }
}

/* Features */
.features { padding-block: 56px; }
.features ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.features li { border-top: 2px solid var(--ink); padding-top: 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.features h2 { font-size: 24px; font-weight: 750; letter-spacing: -.02em; }
.features p { margin: 0; color: var(--muted); }
@media (max-width: 760px) { .features ul { grid-template-columns: 1fr; gap: 28px; } }

.band { background: var(--paper-2); border-block: 1px solid var(--line); }
.closing { padding-block: 64px; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.closing h2 { font-size: clamp(30px, 4.6vw, 46px); font-weight: 800; letter-spacing: -.03em; max-width: 18ch; line-height: 1.06; }
.closing p { margin: 0; color: var(--muted); max-width: 56ch; }

/* Documents (privacy, terms, support) */
.doc { padding-block: 40px 72px; }
.doc-head { max-width: var(--prose); display: flex; flex-direction: column; gap: 14px; margin-bottom: 36px; }
.doc-head h1 { font-size: clamp(36px, 6vw, 56px); font-weight: 800; letter-spacing: -.03em; line-height: 1.04; }
.doc-head p { margin: 0; color: var(--muted); }
.doc-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; }
.toc { position: sticky; top: 24px; font-size: 14px; }
.toc p { font: 600 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.toc ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--ink); }
@media (max-width: 860px) { .doc-layout { grid-template-columns: 1fr; gap: 24px; } .toc { position: static; } }

.prose { max-width: var(--prose); min-width: 0; }
.prose h2 { font-size: 24px; font-weight: 750; letter-spacing: -.015em; margin: 44px 0 12px; scroll-margin-top: 20px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 18px; font-weight: 650; margin: 26px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 14px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--muted); }
.prose strong { font-weight: 650; }
.prose code { font: 14px var(--mono); background: var(--paper-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
.callout { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 24px; }
.callout p:last-child { margin-bottom: 0; }
.todo { background: #FFF3D6; color: #6B4500; border-radius: 4px; padding: 0 4px; font-weight: 600; }
@media (prefers-color-scheme: dark) { .todo { background: #3A2E10; color: #F2C14E; } }
.table-wrap { overflow-x: auto; margin: 0 0 16px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 520px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 650; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }

/* Support */
.contact { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.contact .addr { font: 600 20px var(--display); color: var(--ink); user-select: all; }
details { border-bottom: 1px solid var(--line); padding-block: 14px; }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 22px; line-height: 1; }
details[open] summary::after { content: "−"; }
details > div { padding-top: 10px; color: var(--ink); }
details > div p:last-child, details > div ol:last-child, details > div ul:last-child { margin-bottom: 0; }

/* 404 */
.notfound { padding-block: 96px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.notfound h1 { font-size: clamp(40px, 7vw, 72px); font-weight: 800; letter-spacing: -.035em; }
.notfound p { margin: 0; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 28px 40px; font-size: 14px; color: var(--muted); }
.site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

@media (prefers-reduced-motion: no-preference) {
  .screens li { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
  .screens li:nth-child(2) { animation-delay: .08s; }
  .screens li:nth-child(3) { animation-delay: .16s; }
  @keyframes rise { from { translate: 0 18px; } to { translate: 0 0; } }
}
