/* AgentOS website. It follows the iOS app: a black ground, glass panels,
   grouped lists with icon tiles, capsule buttons. Colours are the app icon's
   glassy black and dark grey, as in the app; nothing is tinted.

   Corners come from three sizes only: --r-panel (glass panels, screenshots),
   --r-inner (anything inside a panel, code blocks, notes) and --r-pill
   (buttons, the header). Icon tiles are 27% like the app's badges. */
:root {
  --ground: #07090b;
  --text: rgba(242, 244, 248, 0.9);
  --text-strong: #f5f6f9;
  --text-2: rgba(235, 238, 245, 0.6);
  --text-3: rgba(235, 238, 245, 0.36);
  --sep: rgba(255, 255, 255, 0.09);
  --fill: rgba(255, 255, 255, 0.07);
  --blue: #4da3ff;
  --orange: #ff9f0a;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Adwaita Sans", "Cantarell", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --r-panel: 28px;
  --r-inner: 14px;
  --r-pill: 999px;
  --page: 1080px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
/* Soft light behind the page, so the glass has something to pick up. */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(760px 560px at 80% 4%, rgba(255, 255, 255, 0.075), transparent 70%),
    radial-gradient(820px 640px at 4% 48%, rgba(255, 255, 255, 0.05), transparent 70%),
    radial-gradient(760px 600px at 94% 98%, rgba(255, 255, 255, 0.045), transparent 70%);
}

img, svg { max-width: 100%; display: block; }
img { height: auto; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: var(--r-inner); }

h1, h2, h3 { color: var(--text-strong); line-height: 1.12; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
p { margin: 0; }

.wrap { max-width: var(--page); margin: 0 auto; padding: 0 24px; }

/* Glass: a translucent fill, a lit top edge and a blur of what is behind. */
.glass, .site-header .bar, .steps > li, pre, .note, .btn, .docs-nav a[aria-current="page"] {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--sep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  backdrop-filter: blur(28px) saturate(170%);
}
.glass, .steps > li { border-radius: var(--r-panel); }

/* Header: a floating capsule, like the app's toolbars. */
.site-header { position: sticky; top: 12px; z-index: 10; padding: 0 16px; margin-top: 12px; }
.site-header .bar {
  max-width: calc(var(--page) - 48px); margin: 0 auto; height: 54px; padding: 0 8px 0 18px;
  display: flex; align-items: center; gap: 24px; border-radius: var(--r-pill);
  background: rgba(22, 25, 30, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.13), 0 12px 32px rgba(0, 0, 0, 0.4);
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--text-strong); font-weight: 650; font-size: 16.5px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 24px; height: 24px; }
.site-nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.site-nav a { color: var(--text-2); font-size: 14.5px; font-weight: 500; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text-strong); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 16px; white-space: nowrap; color: var(--text-strong);
}
.btn:hover { text-decoration: none; filter: brightness(1.25); }
.btn.primary { background: linear-gradient(180deg, #ffffff, #d9dce3); color: #0b0d10; border-color: transparent; box-shadow: inset 0 1px 0 #fff, 0 10px 30px -10px rgba(255, 255, 255, 0.35); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.small { height: 38px; padding: 0 16px; font-size: 14.5px; }
.site-nav .btn { color: var(--text-strong); }

/* Icon tiles: near-black glass, one colour of glyph. */
.tile {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 27%; color: var(--text-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02)), rgba(6, 8, 10, 0.72);
  border: 1px solid var(--sep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  backdrop-filter: blur(20px) saturate(170%);
}
.tile svg { width: 58%; height: 58%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tile img { width: 52%; height: 52%; filter: invert(1); opacity: 0.94; }

/* Hero */
.hero { padding: 76px 0 56px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(40px, 5.6vw, 66px); font-weight: 700; letter-spacing: -0.04em; line-height: 1.04; }
.hero .lede { margin-top: 24px; font-size: 19px; line-height: 1.55; color: var(--text-2); max-width: 33em; }
.hero .actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }
.works-with { margin-top: 44px; color: var(--text-3); font-size: 13.5px; }
.agents { margin-top: 12px; display: flex; flex-wrap: nowrap; gap: 10px; }

.phone {
  justify-self: center; width: min(310px, 78vw);
  border-radius: 50px; padding: 9px;
  background: linear-gradient(160deg, #2a2e36, #121418);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 40px 90px rgba(0, 0, 0, 0.7);
}
.phone img { border-radius: 41px; width: 100%; }

/* Sections */
section { padding: 84px 0; }
.section-head { max-width: 38em; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 44px); font-weight: 700; letter-spacing: -0.035em; }
.section-head p { margin-top: 16px; color: var(--text-2); font-size: 18px; line-height: 1.55; }

/* Architecture diagram */
.arch { display: grid; grid-template-columns: minmax(0, 1.5fr) auto minmax(0, 0.85fr) auto minmax(0, 0.65fr); align-items: center; }
.arch .glass { padding: 20px; }
.arch .where { font-size: 14px; font-weight: 600; color: var(--text-2); margin: 0 0 14px 4px; }
.arch-row { display: flex; gap: 8px; }
.node { flex: 1; min-width: 0; border-radius: var(--r-inner); background: var(--fill); padding: 11px 10px; font-size: 14.5px; font-weight: 500; color: var(--text-strong); text-align: center; }
.node small { display: block; color: var(--text-2); font-size: 12.5px; font-weight: 400; margin-top: 1px; }
.node.hub { background: rgba(255, 255, 255, 0.16); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34); font-family: var(--mono); font-size: 14px; }
.node.sandbox { background: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
.arch-down { text-align: center; color: var(--text-3); font-size: 12.5px; padding: 7px 0; }
.arch-link { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 0 10px; color: var(--text-3); font: 12px/1 var(--mono); }
.arch-link::after { content: ""; width: 48px; height: 2px; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.3); }
.arch-note { margin-top: 22px; color: var(--text-2); font-size: 15px; text-align: center; }

/* Grouped lists, as in iOS Settings */
.groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.group { list-style: none; margin: 0; padding: 6px 0; }
.groups .group { display: grid; grid-template-rows: repeat(3, 1fr); }
.groups .group > li { align-content: center; }
.group > li, .group > a { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding: 18px 24px; position: relative; }
.group > li + li::before, .group > a + a::before { content: ""; position: absolute; top: 0; left: 84px; right: 0; height: 1px; background: var(--sep); }
.group h3 { font-size: 17.5px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
.group p { margin-top: 4px; color: var(--text-2); font-size: 15.5px; line-height: 1.5; }
.group.links > a { grid-template-columns: minmax(0, 1fr) auto; align-items: center; color: inherit; }
.group.links > a + a::before { left: 24px; }
.group.links > a:hover { text-decoration: none; background: rgba(255, 255, 255, 0.04); }
.group.links > a:first-child { border-radius: var(--r-panel) var(--r-panel) 0 0; margin-top: -6px; padding-top: 24px; }
.group.links > a:last-child { border-radius: 0 0 var(--r-panel) var(--r-panel); margin-bottom: -6px; padding-bottom: 24px; }
.chev { width: 9px; height: 9px; border: solid var(--text-3); border-width: 2px 2px 0 0; transform: rotate(45deg); margin-right: 4px; }

/* Approval banner, as the iOS app shows it */
.approval { display: flex; align-items: center; gap: 14px; border-radius: var(--r-panel); padding: 16px 18px; background: linear-gradient(180deg, rgba(255, 159, 10, 0.2), rgba(255, 159, 10, 0.09)); border: 1px solid rgba(255, 159, 10, 0.36); box-shadow: inset 0 1px 0 rgba(255, 220, 150, 0.2); }
.approval .bell { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--orange); display: grid; place-items: center; color: #201300; }
.approval .bell svg { width: 20px; height: 20px; fill: currentColor; }
.approval strong { display: block; color: var(--text-strong); font-size: 16.5px; font-weight: 600; }
.approval .cmd { display: block; margin-top: 1px; color: var(--text-2); font: 13px var(--mono); overflow-wrap: anywhere; }
.approval .review { margin-left: auto; flex: none; border-radius: var(--r-pill); background: var(--orange); color: #201300; font-weight: 650; font-size: 14.5px; padding: 8px 17px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.shot { border-radius: var(--r-panel); overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.14); box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.7); }
.checks { list-style: none; padding: 0; margin: 26px 0 0 4px; display: grid; gap: 14px; color: var(--text-2); }
.checks li { padding-left: 30px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 3px; top: 0.36em; width: 7px; height: 12px; border: solid var(--text-2); border-width: 0 2.5px 2.5px 0; border-radius: 1px; transform: rotate(42deg); }
.checks strong { color: var(--text-strong); font-weight: 600; }

/* Setup steps */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 16px; }
.steps > li { counter-increment: step; padding: 26px 28px 28px; }

.steps h3 { font-size: 21px; font-weight: 650; }
.steps h3::before { content: counter(step); color: var(--text-3); font-variant-numeric: tabular-nums; margin-right: 14px; }
.steps h3 .opt { font-weight: 400; color: var(--text-3); font-size: 15px; letter-spacing: 0; margin-left: 6px; }
.steps p { margin-top: 8px; color: var(--text-2); font-size: 15.5px; }
.steps pre { margin-top: 16px; }
.after { margin-top: 22px; color: var(--text-2); }

/* Code */
code { font: 0.88em var(--mono); background: var(--fill); border-radius: 6px; padding: 0.12em 0.38em; color: var(--text-strong); overflow-wrap: anywhere; }
pre { position: relative; margin: 0; background: rgba(0, 0, 0, 0.38); box-shadow: none; border-radius: var(--r-inner); padding: 15px 18px; overflow-x: auto; font: 13.5px/1.7 var(--mono); color: var(--text-strong); tab-size: 2; }
pre code { background: none; padding: 0; font: inherit; color: inherit; overflow-wrap: normal; }
pre .c { color: var(--text-3); }
pre .p { color: var(--text-3); user-select: none; }
.copy { position: absolute; top: 9px; right: 9px; font: 500 12.5px/1 var(--sans); color: var(--text-2); background: #1b1e24; border: 1px solid var(--sep); border-radius: var(--r-pill); padding: 7px 12px; cursor: pointer; opacity: 0; transition: opacity 0.12s; }
pre:hover .copy, .copy:focus-visible { opacity: 1; }
.copy:hover { color: var(--text-strong); }

/* Notes */
.note { border-radius: var(--r-inner); padding: 14px 18px; color: var(--text); font-size: 15px; }
.note strong { color: var(--text-strong); font-weight: 600; }

/* Footer */
.site-footer { border-top: 1px solid var(--sep); margin-top: 24px; padding: 40px 0 56px; color: var(--text-3); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 20px 40px; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--text-2); }
.site-footer p { max-width: 46em; }

/* Docs */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding-top: 56px; padding-bottom: 96px; }
.docs-nav { position: sticky; top: 96px; align-self: start; font-size: 14.5px; }
.docs-nav h2 { font-size: 13.5px; font-weight: 500; letter-spacing: 0; color: var(--text-3); margin: 0 0 8px 14px; }
.docs-nav ul { list-style: none; margin: 0 0 28px; padding: 0; }
.docs-nav a { display: block; padding: 7px 14px; border-radius: var(--r-inner); color: var(--text-2); border: 1px solid transparent; }
.docs-nav a:hover { background: rgba(255, 255, 255, 0.05); color: var(--text-strong); text-decoration: none; }
.docs-nav a[aria-current="page"] { color: var(--text-strong); border-color: var(--sep); }
.prose { max-width: 740px; min-width: 0; }
.prose h1 { font-size: 42px; font-weight: 700; letter-spacing: -0.035em; }
.prose .lede { margin-top: 14px; font-size: 18.5px; color: var(--text-2); }
.prose h2 { font-size: 25px; font-weight: 650; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--sep); }
.prose h3 { font-size: 18px; font-weight: 650; margin-top: 32px; letter-spacing: -0.01em; }
.prose p, .prose ul, .prose ol, .prose pre, .prose .note, .prose table { margin-top: 16px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 8px; }
.prose li > pre { margin-top: 10px; }
.prose strong { color: var(--text-strong); font-weight: 600; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--sep); vertical-align: top; }
.prose th { color: var(--text-2); font-weight: 500; font-size: 13.5px; }
.pager { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--sep); }

.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.notfound h1 { font-size: 44px; }
.notfound p { margin: 14px 0 26px; color: var(--text-2); }

@media (max-width: 900px) {
  .hero { padding-top: 48px; }
  .hero .wrap, .split { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .groups { grid-template-columns: minmax(0, 1fr); }
  .arch { grid-template-columns: minmax(0, 1fr); }
  .arch-link { flex-direction: row; padding: 10px 0; justify-content: center; }
  .arch-link::after { width: 2px; height: 22px; }
  .docs { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 32px; }
  .docs-nav { position: static; }
  .docs-nav ul { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
  .docs-nav h2 { display: none; }
  section { padding: 60px 0; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .site-header { padding: 0 10px; }
  .site-header .bar { gap: 12px; padding-left: 14px; }
  .site-nav { gap: 14px; }
  .site-nav .hide-s { display: none; }
  .group > li { padding: 16px 18px; gap: 14px; }
  .group > li + li::before { left: 76px; }
  .group.links > a { padding-left: 18px; padding-right: 18px; }
  .steps > li { padding: 20px 18px; }
  .prose h1 { font-size: 32px; }
  .prose table { display: block; overflow-x: auto; }
  .approval .review { display: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
