/* AgentREST website. Tokens follow docs/assets/brand/src/brand.css. No web fonts, no CDNs. */
:root {
  --ink: #0B110E;
  --ink-2: #111916;
  --ink-3: #18221E;
  --line: #22302A;
  --line-2: #2F3D36;
  --paper: #EEF3F0;
  --text: #C9D5CF;
  --muted: #8FA199;
  --dim: #5E6F67;
  --mint: #34E0A1;
  --mint-2: #7BEFC4;
  --amber: #F5C26B;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1160px;
  --r: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--ink); color: var(--text); font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--mint); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, pre, kbd { font-family: var(--mono); }
code { font-size: .9em; color: var(--mint-2); background: var(--ink-3); border: 1px solid var(--line); padding: .08em .38em; border-radius: 5px; overflow-wrap: anywhere; }
h1, h2, h3, h4 { color: var(--paper); line-height: 1.2; margin: 0; letter-spacing: -.015em; }
p { margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--mint); color: var(--ink); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; border-radius: 4px; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(11,17,14,.82); backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand img { height: 26px; width: auto; }
.nav-links { display: flex; gap: 22px; margin-left: 8px; }
.nav-links a { color: var(--muted); font-size: 14.5px; }
.nav-links a:hover { color: var(--paper); text-decoration: none; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.lang { color: var(--muted); font-size: 14px; border: 1px solid var(--line-2); border-radius: 8px; padding: 5px 10px; }
.lang:hover { color: var(--paper); text-decoration: none; border-color: var(--muted); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; border-radius: 10px; padding: 11px 18px; border: 1px solid var(--line-2); color: var(--paper); background: var(--ink-2); white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn.primary { background: var(--mint); color: #04150E; border-color: var(--mint); }
.btn.primary:hover { background: var(--mint-2); border-color: var(--mint-2); }
.btn.sm { padding: 7px 12px; font-size: 14px; border-radius: 8px; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* hero */
.hero { position: relative; padding: 84px 0 72px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--ink-3) 1px, transparent 1px), linear-gradient(90deg, var(--ink-3) 1px, transparent 1px); background-size: 44px 44px; opacity: .5; -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000, transparent 70%); mask-image: radial-gradient(ellipse at 70% 30%, #000, transparent 70%); pointer-events: none; }
.hero::after { content: ""; position: absolute; width: 900px; height: 900px; right: -320px; top: -460px; background: radial-gradient(circle, rgba(52,224,161,.15), transparent 62%); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 500px); gap: 52px; align-items: center; }
.eyebrow { display: inline-flex; flex-wrap: wrap; gap: 8px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin-bottom: 22px; }
.eyebrow span { border: 1px solid var(--line-2); border-radius: 6px; padding: 3px 8px; background: rgba(17,25,22,.7); }
.eyebrow b { color: var(--paper); font-weight: 500; }
.hero h1 { font-size: clamp(34px, 4.6vw, 56px); line-height: 1.08; letter-spacing: -.03em; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--mint); }
.hero .lead { margin-top: 22px; font-size: 18.5px; line-height: 1.65; color: var(--text); max-width: 600px; }
.hero .lead b { color: var(--paper); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .note { margin-top: 16px; font-size: 13.5px; color: var(--dim); }

/* cards / terminal */
.card { background: rgba(17,25,22,.94); border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.card-head { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12px; color: var(--dim); min-width: 0; }
.card-head > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dots { display: flex; gap: 6px; margin-right: 4px; flex: none; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); display: block; }
.term pre { margin: 0; padding: 14px 16px 16px; font-size: 12.5px; line-height: 1.75; color: var(--paper); overflow-x: auto; }
.term .p, .term .m { color: var(--mint); }
.term .c { color: var(--dim); }
.hero-stack { display: grid; gap: 16px; min-width: 0; }
.audit-rows { font-family: var(--mono); font-size: 12.5px; }
.audit-rows .row { display: grid; grid-template-columns: 50px 56px minmax(0, 1fr) 70px; gap: 8px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.audit-rows .row:last-child { border-bottom: 0; }
.audit-rows .row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { justify-self: start; font-size: 11px; font-weight: 700; letter-spacing: .04em; padding: 2px 6px; border-radius: 5px; }
.tag.rest { color: var(--paper); background: #26332D; }
.tag.mcp { color: #04150E; background: var(--mint); }
.ok { color: var(--mint); }
.deny { color: var(--amber); }

/* sections */
section { padding: 88px 0; border-top: 1px solid var(--line); scroll-margin-top: 64px; }
.kicker { font-family: var(--mono); font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--mint); margin-bottom: 14px; }
.sec-title { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -.025em; font-weight: 750; max-width: 820px; }
.sec-lead { margin-top: 16px; font-size: 17.5px; color: var(--text); max-width: 760px; }
.grid { display: grid; gap: 16px; margin-top: 44px; }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; min-width: 0; }
.tile h3 { font-size: 18px; margin-bottom: 10px; }
.tile p, .tile li { font-size: 15px; color: var(--text); }
.tile ul { margin: 0; padding-left: 18px; }
.tile li + li { margin-top: 4px; }
.tile .label { font-family: var(--mono); font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 10px; }
.tile.bad .label { color: var(--amber); }
.tile.good { border-color: rgba(52,224,161,.5); background: linear-gradient(180deg, rgba(52,224,161,.07), rgba(52,224,161,0) 70%), var(--ink-2); }
.tile.good .label { color: var(--mint); }
.figure { margin: 44px 0 0; }
.figure img { border-radius: var(--r); border: 1px solid var(--line); background: var(--ink-2); width: 100%; }
.figure figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); }

/* steps */
.steps { display: grid; gap: 16px; margin-top: 44px; grid-template-columns: repeat(3, minmax(0, 1fr)); counter-reset: s; }
.step { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.step h3 { font-size: 17px; display: flex; align-items: center; gap: 10px; }
.step h3::before { counter-increment: s; content: counter(s); display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--mint); color: #04150E; font-size: 14px; font-weight: 800; flex: none; }
.step p { font-size: 14.5px; color: var(--muted); }
.code { position: relative; background: var(--ink); border: 1px solid var(--line-2); border-radius: 10px; min-width: 0; }
.code pre { margin: 0; padding: 14px 16px; padding-right: 64px; font-size: 13px; line-height: 1.7; color: var(--paper); overflow-x: auto; white-space: pre; }
.code .p { color: var(--mint); user-select: none; }
.code .c { color: var(--dim); }
.copy { position: absolute; top: 8px; right: 8px; font: 600 12px var(--sans); color: var(--muted); background: var(--ink-3); border: 1px solid var(--line-2); border-radius: 7px; padding: 4px 9px; cursor: pointer; }
.copy:hover { color: var(--paper); border-color: var(--muted); }
.copy.done { color: var(--mint); border-color: var(--mint); }

/* features */
.feat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 44px; }
.feat .tile h3 { display: flex; align-items: baseline; gap: 10px; font-size: 17px; }
.feat .tile h3 code { font-size: 12px; }

/* security */
.gates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 16px; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; }
.gate { padding: 16px; border-right: 1px solid var(--line-2); min-width: 0; }
.gate:last-child { border-right: 0; }
.gate b { display: block; font-family: var(--mono); font-size: 12px; color: var(--mint); margin-bottom: 6px; }
.gate code { font-size: 12px; }
.gate p { font-size: 14px; color: var(--muted); margin-top: 6px; }
.honest { margin-top: 16px; font-size: 14.5px; color: var(--muted); }

/* quick start */
.qs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 44px; }
.qs .tile { display: flex; flex-direction: column; gap: 14px; }
.qs .tile p { color: var(--muted); font-size: 14.5px; }
.users { width: 100%; border-collapse: collapse; font-size: 14px; }
.users td { padding: 6px 0; border-bottom: 1px solid var(--line); color: var(--text); }
.users td:first-child { font-family: var(--mono); color: var(--paper); padding-right: 12px; white-space: nowrap; }

/* screenshots */
.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 44px; }
.shots figure { margin: 0; min-width: 0; }
.shots img { border-radius: 12px; border: 1px solid var(--line); background: var(--ink-2); width: 100%; }
.shots figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }
.shots figcaption b { color: var(--paper); font-weight: 600; }
.shots .wide { grid-column: 1 / -1; }

/* faq */
.faq { margin-top: 36px; max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; color: var(--paper); font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--mint); font-family: var(--mono); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 12px; font-size: 15.5px; color: var(--text); }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 44px 0 56px; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.site-footer img { height: 22px; width: auto; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--paper); }

/* responsive */
@media (max-width: 1020px) {
  .nav-links { display: none; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .feat, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps, .g3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .wrap { padding: 0 18px; }
  .hero { padding: 52px 0 56px; }
  .hero .lead { font-size: 16.5px; }
  section { padding: 64px 0; }
  .feat, .g4, .g2, .qs, .shots { grid-template-columns: minmax(0, 1fr); }
  .gates { grid-template-columns: minmax(0, 1fr); }
  .gate { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .gate:last-child { border-bottom: 0; }
  .nav { gap: 12px; }
  .nav-right .gh-text { display: none; }
  .audit-rows .row { grid-template-columns: 46px 50px minmax(0, 1fr) 64px; font-size: 11.5px; padding: 9px 12px; }
  .term pre { font-size: 12px; }
  .cta .btn { flex: 1 1 auto; justify-content: center; }
}

/* layout refinements */
.steps { grid-template-columns: minmax(0, 1fr); }
.step { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 10px 32px; align-items: center; }
.step h3 { grid-column: 1; }
.step p { grid-column: 1; }
.step .code { grid-column: 2; grid-row: 1 / span 2; }
.gates { margin-top: 16px; background: var(--ink-2); }
.gate { padding: 20px 22px; }
.gate b { font-size: 12.5px; }
.gate code { font-size: 13px; }
.shots .stack { display: grid; gap: 20px; align-content: start; min-width: 0; }
@media (max-width: 860px) {
  .step { grid-template-columns: minmax(0, 1fr); }
  .step .code { grid-column: 1; grid-row: auto; }
}

/* beaver mascot: rises from behind a card, joining two plugs; its cables run down into the card below */
.peek { position: relative; min-width: 0; }
.peek { --bw: 196px; --br: 64px; }
.peek > .beaver { position: absolute; bottom: 100%; right: var(--br); width: var(--bw); height: auto; pointer-events: none; animation: rise .9s cubic-bezier(.2,.8,.2,1) .25s both; }
.peek > .card { position: relative; z-index: 1; }
.hero-stack { padding-top: 128px; }
/* Hero: the beaver's two cables end at the card's top edge (at 3% / 97% of the figure width) and
   continue into two "sockets" in the card header - REST on one side, AI agent (MCP) on the other. */
.sockets { position: absolute; top: 0; right: var(--br); width: var(--bw); height: 0; }
.sockets .tag { position: absolute; top: 10px; transform: translateX(-50%); white-space: nowrap; animation: plug-in .4s ease-out 1s both; }
.sockets .tag:first-child { left: 3%; }
.sockets .tag:last-child { left: 97%; }
.sockets .tag::before { content: ""; position: absolute; left: 50%; bottom: 100%; width: 9px; height: 11px; margin-left: -4.5px; background: #3a4240; }
@keyframes plug-in { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40%); } }
@media (prefers-reduced-motion: reduce) { .peek > .beaver, .sockets .tag { animation: none; } }
.closing { padding-top: 150px; }
.closing .peek > .beaver { right: auto; left: 44px; width: 210px; animation: none; }
.closing-card { display: flex; align-items: center; justify-content: space-between; gap: 28px 40px; flex-wrap: wrap; padding: 34px 36px; background: linear-gradient(120deg, rgba(52,224,161,.08), rgba(17,25,22,.94) 55%); border-color: rgba(52,224,161,.35); }
.closing-card > div:first-child { flex: 1 1 420px; min-width: 0; }
.closing-card h2 { font-size: clamp(24px, 2.8vw, 32px); letter-spacing: -.02em; font-weight: 750; }
.closing-card h2 em { font-style: normal; color: var(--mint); }
.closing-card p { margin-top: 10px; color: var(--text); font-size: 15.5px; max-width: 620px; }
.closing-card p b { color: var(--paper); font-weight: 600; }
.closing-card .cta { margin-top: 0; }
@media (max-width: 720px) {
  .hero-stack { padding-top: 104px; }
  .peek { --bw: 150px; --br: 40px; }
  .sockets .tag::before { width: 7px; margin-left: -3.5px; }
  .card-head:has(.sockets) > span:last-child { visibility: hidden; } /* the path label would sit under the REST socket */
  .closing { padding-top: 124px; }
  .closing .peek > .beaver { width: 164px; left: 22px; }
  .closing-card { padding: 26px 22px; }
}
