/* Agent Companion - one stylesheet, no framework, no JavaScript.
   Palette and type are taken from the logo: a soft-cornered cream chevron on ink. */
:root {
  --ink: #0b0b0b;
  --ink-2: #121212;
  --ink-3: #1b1b1a;
  --cream: #f6efe2;
  --cream-2: #e9dfcc;
  --text: rgba(246, 239, 226, 0.92);
  --dim: rgba(246, 239, 226, 0.6);
  --faint: rgba(246, 239, 226, 0.38);
  --rule: rgba(246, 239, 226, 0.12);
  --rule-ink: rgba(11, 11, 11, 0.14);
  --tan: #c9b48f;           /* the warm fold of the chevron, for labels and accents */
  --max: 1200px;
  --display: "Outfit", "Segoe UI", system-ui, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --cut: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--tan); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--cream); color: var(--ink); padding: 8px 12px; z-index: 20; }
.skip:focus { left: 8px; }

/* The frame: thin vertical rules running down the page, like a technical drawing */
.frame { max-width: var(--max); margin: 0 auto; border-left: 1px solid var(--rule); border-right: 1px solid var(--rule); }
.pad { padding-left: 40px; padding-right: 40px; }

/* ---------- Labels and buttons ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--tan); border: 1px solid var(--rule); background: var(--ink-2); padding: 6px 12px;
}
.chip::before { content: "\203A"; font-size: 15px; line-height: 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0.02em;
  text-decoration: none; padding: 14px 24px; border: 0;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-ink { background: var(--ink); color: var(--cream); }
.btn-cream { background: var(--cream); color: var(--ink); }
.btn-line, .btn-ghost { position: relative; isolation: isolate; }
.btn-line::before, .btn-ghost::before {
  content: ""; position: absolute; inset: 1px; z-index: -1;
  clip-path: polygon(calc(var(--cut) - 0.4px) 0, 100% 0, 100% calc(100% - var(--cut) + 0.4px), calc(100% - var(--cut) + 0.4px) 100%, 0 100%, 0 calc(var(--cut) - 0.4px));
}
.btn-line { color: var(--ink); background: var(--ink); }
.btn-line::before { background: var(--cream); }
.btn-ghost { color: var(--cream); background: rgba(246, 239, 226, 0.45); }
.btn-ghost::before { background: var(--ink); }
.btn-off { opacity: 0.55; pointer-events: none; }

/* ---------- Top panel (cream, with scanlines and the giant chevron) ---------- */
.top {
  position: relative; overflow: hidden; color: var(--ink);
  background:
    repeating-linear-gradient(0deg, rgba(11, 11, 11, 0.035) 0 1px, transparent 1px 4px),
    var(--cream);
}
.top .ghost { position: absolute; right: -4%; top: -6%; width: 60%; max-width: 760px; pointer-events: none; }
.top .ghost path { fill: none; stroke: var(--ink); stroke-opacity: 0.07; stroke-linejoin: round; stroke-linecap: round; }
.site-header { position: relative; z-index: 2; display: flex; align-items: center; gap: 28px; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: -0.02em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 26px; font-size: 14px; }
.site-nav a { text-decoration: none; opacity: 0.72; }
.site-nav a:hover, .site-nav a[aria-current="page"] { opacity: 1; }
.site-nav .btn { opacity: 1; padding: 11px 18px; font-size: 12px; }
.lang { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; }

.hero { position: relative; z-index: 1; padding: 72px 0 96px; }
.hero h1 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(48px, 8vw, 104px); line-height: 0.95; letter-spacing: -0.045em;
  margin: 0 0 28px; max-width: 11ch;
}
.hero .lead { font-size: 20px; line-height: 1.5; max-width: 40ch; color: rgba(11, 11, 11, 0.72); margin: 0 0 40px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.page-head { position: relative; z-index: 1; padding: 64px 0 72px; }
.page-head h1 { font-family: var(--display); font-weight: 500; font-size: clamp(42px, 6vw, 76px); line-height: 0.98; letter-spacing: -0.04em; margin: 0 0 16px; }
.page-head p { margin: 0; color: rgba(11, 11, 11, 0.68); max-width: 56ch; }
.page-head a { color: var(--ink); }

/* ---------- Ticker ---------- */
.ticker { overflow: hidden; background: var(--cream); color: var(--ink); border-top: 1px solid var(--rule-ink); padding: 14px 0; }
.ticker .track { display: flex; width: max-content; animation: scroll 48s linear infinite; }
.ticker span { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; padding: 0 28px; white-space: nowrap; }
.ticker span::after { content: "\2022"; margin-left: 56px; opacity: 0.5; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: 112px 0 0; }
.section + .section { border-top: 1px solid var(--rule); }
.head { text-align: center; max-width: 760px; margin: 0 auto; padding: 0 24px 64px; }
.head .chip { margin-bottom: 26px; }
h2 { font-family: var(--display); font-weight: 500; font-size: clamp(36px, 5vw, 62px); line-height: 1.02; letter-spacing: -0.04em; color: var(--cream); margin: 0 0 20px; }
h3 { font-family: var(--display); font-weight: 500; font-size: 22px; letter-spacing: -0.02em; color: var(--cream); margin: 0 0 10px; line-height: 1.2; }
.head p { color: var(--dim); font-size: 17px; margin: 0; }
.head.left { text-align: left; margin: 0; padding: 0; }

/* Grid of cells with hairline borders */
.cells { display: grid; border-top: 1px solid var(--rule); }
.cells > * { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 32px; position: relative; }
.cells > *:last-child { border-right: 0; }
.cell-tag { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tan); margin-bottom: 14px; }
.cell-tag b { font-weight: 400; color: var(--faint); }
.cells p { color: var(--dim); font-size: 15px; margin: 0; }

.why { grid-template-columns: 1.1fr 1fr 1fr; }
.why .diagram { grid-row: span 2; display: flex; align-items: center; justify-content: center; }
.why > :nth-child(3), .why > :nth-child(5) { border-right: 0; }

/* Diagram: three surfaces wired to one workspace */
.dia { width: 100%; max-width: 300px; position: relative; padding: 18px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.dia::before, .dia::after { content: ""; position: absolute; width: 14px; height: 14px; border: 1px solid var(--faint); }
.dia::before { top: 0; left: 0; border-right: 0; border-bottom: 0; }
.dia::after { bottom: 0; right: 0; border-left: 0; border-top: 0; }
.dia .row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dia .box { border: 1px solid var(--rule); background: var(--ink-2); padding: 12px 4px; text-align: center; }
.dia .wires { height: 54px; margin: 0 16%; border-left: 1px dashed var(--faint); border-right: 1px dashed var(--faint); position: relative; }
.dia .wires::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px dashed var(--faint); }
.dia .core { border: 1px solid var(--tan); color: var(--cream); background: rgba(201, 180, 143, 0.08); padding: 16px; text-align: center; display: flex; align-items: center; justify-content: center; gap: 10px; }
.dia .core img { width: 22px; height: 22px; border-radius: 6px; }

/* ---------- Product mock ---------- */
.mock { margin: 0 40px; border: 1px solid var(--rule); background: var(--ink-2); }
.mock-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--rule); font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: 0.04em; }
.mock-bar::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tan); }
.mock-body { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 380px; }
.pane { padding: 20px; }
.pane + .pane { border-left: 1px solid var(--rule); display: flex; flex-direction: column; }
.pane-title { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--faint); margin-bottom: 20px; }
.pane-title span:first-child { color: var(--dim); }
.field { display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.field .k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--faint); text-transform: uppercase; }
.field .v { color: var(--cream); justify-self: start; }
.field.live .v { border-right: 2px solid var(--tan); padding-right: 3px; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { border-color: transparent; } }
.field.todo .v { height: 10px; width: 55%; background: var(--ink-3); }
.done-note { margin-top: 18px; font-family: var(--mono); font-size: 12px; color: var(--tan); }
.msg { max-width: 82%; font-size: 14px; padding: 10px 14px; margin-bottom: 12px; border: 1px solid var(--rule); }
.msg small { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.msg.you { align-self: flex-end; background: var(--ink-3); }
.msg.agent { align-self: flex-start; }
.thinking { font-family: var(--mono); font-size: 12px; color: var(--dim); display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.thinking::before { content: ""; width: 6px; height: 6px; background: var(--tan); animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.2; } }
.composer { margin-top: auto; border: 1px solid var(--rule); padding: 12px 14px; font-size: 13px; color: var(--faint); display: flex; justify-content: space-between; }
.mock-foot { display: flex; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--rule); font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--faint); text-transform: uppercase; }

.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 28px 40px 0; padding-bottom: 104px; }
.flow > div { border-top: 1px solid var(--rule); padding-top: 14px; }
.flow > div:first-child { border-top-color: var(--tan); }
.flow .n { font-family: var(--mono); font-size: 11px; color: var(--tan); letter-spacing: 0.1em; }
.flow h3 { font-size: 19px; margin: 10px 0 6px; }
.flow p { color: var(--dim); font-size: 14px; margin: 0; }

/* ---------- Apps ---------- */
.apps { grid-template-columns: repeat(3, 1fr); }
.apps > article { display: flex; flex-direction: column; padding: 36px 32px; }
.apps h3 { font-size: 28px; }
.apps ul { list-style: none; margin: 14px 0 28px; padding: 0; }
.apps li { position: relative; padding: 10px 0 10px 22px; border-top: 1px solid var(--rule); font-size: 15px; color: var(--dim); }
.apps li::before { content: ""; position: absolute; left: 0; top: 17px; width: 9px; height: 9px; background: url("../img/chevron.png") center / contain no-repeat; }
.apps .get { margin-top: auto; }
.apps .note { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 14px; letter-spacing: 0.02em; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 0 40px 104px; }
.steps > div { border-top: 1px solid var(--rule); padding-top: 18px; }
.steps .n { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--tan); text-transform: uppercase; }
.steps h3 { margin-top: 12px; }
.steps p { color: var(--dim); font-size: 15px; margin: 0; }

/* ---------- Trust ---------- */
.trust-top { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--rule); }
.trust-top > div { padding: 56px 40px; }
.trust-top > div + div { border-left: 1px solid var(--rule); display: flex; align-items: center; justify-content: center; }
.trust-top .btn { margin-top: 28px; }
.seal { width: 220px; aspect-ratio: 1; position: relative; display: grid; place-items: center; }
.seal::before, .seal::after { content: ""; position: absolute; inset: 0; border: 1px dashed var(--faint); border-radius: 50%; }
.seal::after { inset: 28px; border-style: solid; border-color: var(--rule); }
.seal img { width: 72px; height: 72px; border-radius: 18px; position: relative; z-index: 1; }
.seal span { position: absolute; bottom: -30px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--faint); white-space: nowrap; }
.trust { grid-template-columns: repeat(4, 1fr); text-align: center; }
.trust > div { padding: 36px 24px; }
.trust h3 { font-size: 24px; }

/* ---------- FAQ (native details/summary, no script) ---------- */
.faq { margin: 0 40px; padding-bottom: 112px; }
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 22px; padding: 22px 6px; font-size: 17px; color: var(--cream); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .n { font-family: var(--mono); font-size: 11px; color: var(--tan); }
.faq summary::after { content: "+"; margin-left: auto; font-family: var(--mono); color: var(--faint); font-size: 18px; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 24px 52px; color: var(--dim); max-width: 70ch; }
.faq details a { color: var(--cream); text-decoration-color: var(--tan); }

/* ---------- Final call to action with a wireframe floor ---------- */
.final { position: relative; overflow: hidden; text-align: center; padding: 120px 24px 230px; border-top: 1px solid var(--rule); }
.final img { width: 64px; height: 64px; border-radius: 16px; margin: 0 auto 30px; position: relative; z-index: 1; }
.final h2 { font-size: clamp(48px, 8vw, 104px); line-height: 0.95; letter-spacing: -0.05em; max-width: 12ch; margin: 0 auto 40px; position: relative; z-index: 1; }
.final .btn { position: relative; z-index: 1; min-width: 260px; padding: 18px 28px; font-size: 14px; }
.floor {
  position: absolute; left: -25%; right: -25%; bottom: -42%; height: 72%;
  background-image:
    linear-gradient(rgba(246, 239, 226, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 239, 226, 0.22) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: perspective(520px) rotateX(64deg);
  transform-origin: center top;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 30%, #000 70%, transparent);
  animation: drift 6s linear infinite;
}
@keyframes drift { to { background-position: 0 56px; } }
.spark { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--tan); box-shadow: 0 0 12px 3px rgba(201, 180, 143, 0.55); }

/* ---------- Legal and support pages ---------- */
.prose { max-width: 780px; margin: 0 auto; padding: 72px 40px 112px; }
.prose h2 { font-size: 30px; letter-spacing: -0.03em; margin: 56px 0 14px; padding-top: 24px; border-top: 1px solid var(--rule); }
.prose h3 { font-size: 20px; margin: 30px 0 8px; }
.prose p, .prose li { color: var(--dim); }
.prose strong { color: var(--cream); font-weight: 600; }
.prose a { color: var(--cream); text-decoration-color: var(--tan); text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 4px 0; }
.prose code { font-family: var(--mono); font-size: 0.86em; background: var(--ink-3); border: 1px solid var(--rule); padding: 1px 6px; color: var(--cream); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 20px 0; }
.prose th, .prose td { text-align: left; padding: 12px; border-bottom: 1px solid var(--rule); vertical-align: top; color: var(--dim); }
.prose td:first-child { color: var(--cream); }
.prose th { font-family: var(--mono); font-size: 11px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.12em; color: var(--tan); }
.callout { border: 1px solid var(--rule); border-left: 2px solid var(--tan); background: var(--ink-2); padding: 18px 22px; margin: 24px 0; }
.callout p { margin: 0; }
.toc { columns: 2; font-size: 15px; margin: 8px 0 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); background: #070707; font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-top: 56px; padding-bottom: 40px; }
.foot-grid .brand { color: var(--cream); margin-bottom: 14px; }
.foot-grid p { color: var(--faint); margin: 0; max-width: 32ch; }
.foot-grid h4 { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tan); margin: 6px 0 16px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin: 0 0 10px; }
.foot-grid a { color: var(--dim); text-decoration: none; }
.foot-grid a:hover { color: var(--cream); }
.legal-line { border-top: 1px solid var(--rule); padding-top: 20px; padding-bottom: 28px; font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: 0.02em; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .why { grid-template-columns: 1fr 1fr; }
  .why .diagram { grid-column: span 2; grid-row: auto; }
  .why > * { border-right: 1px solid var(--rule); }
  .why > .diagram, .why > :nth-child(odd) { border-right: 0; }
  .apps, .steps, .trust-top, .flow { grid-template-columns: 1fr; }
  .apps > article { border-right: 0; }
  .trust { grid-template-columns: 1fr 1fr; }
  .trust > :nth-child(2) { border-right: 0; }
  .trust-top > div + div { border-left: 0; border-top: 1px solid var(--rule); padding-bottom: 80px; }
  .mock-body { grid-template-columns: 1fr; }
  .pane + .pane { border-left: 0; border-top: 1px solid var(--rule); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .pad { padding-left: 20px; padding-right: 20px; }
  .site-nav a:not(.lang):not(.btn) { display: none; }
  .site-nav { gap: 16px; }
  .why { grid-template-columns: 1fr; }
  .why .diagram { grid-column: auto; }
  .why > * { border-right: 0 !important; }
  .trust { grid-template-columns: 1fr; }
  .trust > * { border-right: 0 !important; }
  .mock, .flow, .faq { margin-left: 20px; margin-right: 20px; }
  .steps { padding-left: 20px; padding-right: 20px; }
  .field { grid-template-columns: 96px 1fr; }
  .faq details p { margin-left: 0; }
  .prose { padding: 56px 20px 88px; }
  .toc { columns: 1; }
  .foot-grid { grid-template-columns: 1fr; }
  .top .ghost { width: 120%; right: -50%; top: 10%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.top .frame { border-color: var(--rule-ink); position: relative; z-index: 1; }
.brand { white-space: nowrap; }
.toc li { break-inside: avoid; }
.toc li:first-child { margin-top: 0; }
@media (max-width: 640px) {
  .brand { font-size: 17px; gap: 10px; }
  .brand img { width: 30px; height: 30px; }
  .site-nav .btn { padding: 10px 14px; font-size: 11px; }
}
@media (max-width: 380px) { .site-nav .btn { display: none; } }
