/* botportal.app. Tokens and rules from docs/brand.md (Dawn set, Geist, the J mark). */

@font-face { font-family: "Geist"; font-weight: 400; font-style: normal; font-display: swap; src: url(/fonts/geist-400.woff2) format("woff2"); }
@font-face { font-family: "Geist"; font-weight: 500; font-style: normal; font-display: swap; src: url(/fonts/geist-500.woff2) format("woff2"); }
@font-face { font-family: "Geist"; font-weight: 700; font-style: normal; font-display: swap; src: url(/fonts/geist-700.woff2) format("woff2"); }

:root {
  color-scheme: light dark;
  --ink: #1c1c1e; --bg: #ffffff; --quiet: #6b6b70; --line: #d9d9de; --card: #f6f6f8; --card-2: #ffffff;
  --accent: #ff5a1f; --accent-text: #c2410c;
  --amber: #ffb224; --orange: #ff5a1f; --rose: #ff4f8b;
  --block: #141416; --block-logo: #141416; --block-text: #f2f2f4;
  --amber-text: #9a5b00; --rose-text: #be185d;
  --radius: 14px;
  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2f2f4; --bg: #1c1c1e; --quiet: #a1a1a8; --line: #3a3a3e; --card: #232326; --card-2: #2a2a2e;
    --accent-text: #ff7a45; --block: #0f0f11; --block-logo: #f2f2f0; --amber-text: #ffbe3c; --rose-text: #ff7aa8;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); text-underline-offset: 3px; text-decoration-thickness: 1px; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; }
h2 { font-size: clamp(28px, 3.6vw, 40px); }
h3 { font-size: 19px; letter-spacing: -0.01em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.quiet { color: var(--quiet); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.top { display: flex; align-items: center; gap: 24px; padding: 20px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 17px; letter-spacing: -0.01em; }
.brand svg { width: 30px; height: 30px; display: block; }
.top nav { display: flex; gap: 22px; margin-left: auto; }
.top nav a { color: var(--quiet); text-decoration: none; font-size: 15px; font-weight: 500; }
.top nav a:hover { color: var(--ink); }
@media (max-width: 720px) { .top nav { display: none; } .top .btn { margin-left: auto; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 10px; border: 1px solid transparent; font-weight: 500; font-size: 16px; line-height: 1.2; text-decoration: none; cursor: pointer; background: var(--ink); color: var(--bg); transition: transform .12s ease, background-color .12s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-accent { background: var(--accent); color: #1c1c1e; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--quiet); }
.btn-small { padding: 9px 14px; font-size: 15px; }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; padding: 56px 0 72px; }
@media (max-width: 880px) { .hero { grid-template-columns: 1fr; gap: 36px; padding: 32px 0 56px; } }
.eyebrow { font-size: 14px; font-weight: 500; color: var(--quiet); margin-bottom: 18px; letter-spacing: 0.01em; }
.hero h1 { font-size: clamp(36px, 5vw, 56px); margin-bottom: 20px; }
.cycle { color: var(--accent-text); white-space: nowrap; }
.cycle .w { display: inline-block; transition: opacity .25s ease, transform .25s ease; }
.cycle .w.out { opacity: 0; transform: translateY(6px); }
.lede { font-size: 19px; color: var(--quiet); max-width: 32em; margin-bottom: 28px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.trust { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--quiet); }
.trust svg { flex: none; width: 18px; height: 18px; }

/* The stage: the mark with the light inside, and the agent at the window */
.stage { display: grid; justify-items: center; }
.scene { display: grid; grid-template-columns: minmax(150px, 280px) auto; align-items: center; gap: clamp(6px, 2.5vw, 24px); }
.portal { position: relative; width: 100%; max-width: 280px; aspect-ratio: 1; }
.portal::before { content: ""; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 90, 31, .30), rgba(255, 178, 36, .12) 55%, transparent 100%); filter: blur(18px); z-index: 0; }
.portal canvas, .portal svg { position: relative; z-index: 1; display: block; width: 100%; height: 100%; }
.portal canvas { display: none; }
.portal.gl canvas { display: block; }
.portal.gl svg { display: none; }
.maker { display: grid; justify-items: center; }
.maker-art { display: grid; align-items: end; justify-items: center; width: min(170px, 30vw); height: min(130px, 23vw); transition: opacity .32s ease, transform .32s ease; }
.maker-art.out { opacity: 0; transform: translateY(6px); }
.maker-art .ball { width: 78%; height: auto; display: block; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .14)); }
.maker-art .char { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .14)); }
.maker-art .monogram { width: 62%; height: auto; display: block; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .14)); }
.maker-art .chip-big { width: 64px; height: 64px; border-radius: 18px; font-size: 28px; }
.maker-status { position: relative; z-index: 1; margin-top: -4px; display: grid; justify-items: center; gap: 1px; padding: 6px 10px 7px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); box-shadow: 0 6px 18px rgba(0, 0, 0, .08); font-size: 13px; line-height: 1.3; color: var(--quiet); text-align: center; max-width: min(200px, 42vw); transition: opacity .26s ease; }
.maker-status.out { opacity: 0; }
.maker-status b { font-weight: 500; color: var(--ink); font-size: 14px; }
.maker-status .doing { display: inline-flex; align-items: center; gap: 5px; }
.maker-status .doing svg { flex: none; width: 18px; height: 18px; }
@media (max-width: 480px) {
  .scene { grid-template-columns: minmax(0, 280px) auto; }
  .maker { width: 46vw; }
  .maker-art { width: 100%; height: 26vw; }
  .maker-status { font-size: 12px; padding: 5px 8px 6px; max-width: 100%; }
  .maker-status b { font-size: 13px; }
  .maker-status .doing { gap: 4px; }
  .maker-status .doing svg { width: 16px; height: 16px; }
}

/* Bands */
.band { padding: 64px 0; border-top: 1px solid var(--line); }
.band-head { max-width: 46em; margin-bottom: 32px; }
.band-head p { margin-top: 12px; color: var(--quiet); font-size: 18px; }

/* Agent tabs */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); margin-bottom: 20px; }
.tabs button { border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; font-size: 15px; font-weight: 500; color: var(--quiet); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.tabs button:hover { color: var(--ink); }

/* The demo, inside each agent's own frame. The frames are the agents' light interfaces, so they
   keep light colours in dark mode too; the tokens are redefined on .frame for everything inside. */
.chip { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 700; flex: none; overflow: hidden; }
.chip.has-logo { background: #fff; border: 1px solid var(--line); }
.chip img { width: 100%; height: 100%; object-fit: contain; display: block; padding: 3px; box-sizing: border-box; }
.chip-big { width: 54px; height: 54px; border-radius: 16px; font-size: 24px; }
.cycle .chip { width: 0.9em; height: 0.9em; border-radius: 0.2em; font-size: inherit; vertical-align: -0.08em; margin-right: 0.18em; }
.cycle .chip:not(.has-logo) { display: none; }
.frame-host { position: relative; max-width: 760px; }
.frame-host .replay { position: absolute; top: 10px; right: 10px; z-index: 3; background: #fff; border: 1px solid #d9d9de; border-radius: 8px; padding: 6px 10px; font-size: 14px; color: #6b6b70; cursor: pointer; }
.frame-host .replay:hover { color: #1c1c1e; border-color: #6b6b70; }
.frame { --ink: #1c1c1e; --bg: #ffffff; --quiet: #6b6b70; --line: #e3e3e8; --card: #f3f3f1; --card-2: #ffffff; --accent-text: #c2410c; color: var(--ink); font-size: 14px; line-height: 1.45; }
.frame .chat-body { padding: 16px; display: grid; gap: 10px; min-height: 400px; align-content: start; }
.msg { max-width: 90%; opacity: 0; transform: translateY(8px); transition: opacity .3s ease, transform .3s ease; }
.msg.in { opacity: 1; transform: none; }
.msg-sys { font-size: 12px; color: var(--quiet); justify-self: center; text-align: center; }
.msg-sys .rt { display: inline-block; background: var(--ink); color: var(--bg); padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 500; }
.msg-agent { padding: 10px 13px; border-radius: 14px; background: var(--card); border-bottom-left-radius: 5px; }
.msg-user { justify-self: end; padding: 10px 13px; border-radius: 14px; background: var(--ink); color: var(--bg); border-bottom-right-radius: 5px; }
.msg-agent ul { margin: 8px 0 0; padding-left: 18px; }
.msg-agent li { margin: 4px 0; }
.saves { display: grid; margin-top: 8px; }
.save { display: grid; gap: 1px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.save:last-child { padding-bottom: 0; }
.save b { font-weight: 500; }
.save span { color: var(--quiet); font-size: 12px; }
.save em { font-style: normal; color: var(--accent-text); font-size: 12px; }
.tasks { display: grid; gap: 6px; margin-top: 8px; font-size: 13px; }
.task { display: flex; align-items: center; gap: 9px; color: var(--quiet); transition: color .3s ease; }
.task .box { width: 17px; height: 17px; border-radius: 6px; border: 1.5px solid #cfcfd4; display: grid; place-items: center; flex: none; transition: background-color .3s ease, border-color .3s ease; }
.task .box svg { width: 11px; height: 11px; opacity: 0; transition: opacity .3s ease; }
.task.done { color: var(--ink); }
.task.done .box { background: var(--accent); border-color: var(--accent); }
.task.done .box svg { opacity: 1; }
.task.busy .box { border-color: var(--accent); }
.titlebar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--quiet); }
.lights { display: inline-flex; gap: 6px; }
.lights i { width: 10px; height: 10px; border-radius: 50%; background: #e4e4e8; }
.lights i:nth-child(1) { background: #ff5f57; } .lights i:nth-child(2) { background: #febc2e; } .lights i:nth-child(3) { background: #28c840; }
.composer { display: flex; align-items: center; gap: 10px; margin: 6px 12px 12px; padding: 8px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--quiet); font-size: 13px; }
.composer span:nth-child(2) { flex: 1; }
.wave { display: inline-flex; align-items: center; gap: 2px; height: 28px; }
.wave i { display: block; width: 3px; border-radius: 2px; background: var(--ink); }
.badge { position: absolute; left: 50%; top: -22px; transform: translateX(-50%); display: grid; justify-items: center; gap: 2px; z-index: 2; }
.badge .char, .badge .chip-big { width: 56px; height: 56px; border-radius: 50%; object-fit: contain; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); display: block; }
.badge .pill { background: #fff; border-radius: 14px; padding: 5px 12px; text-align: center; box-shadow: 0 4px 14px rgba(0, 0, 0, .08); font-size: 12px; color: var(--quiet); white-space: nowrap; }
.badge .pill b { display: block; font-size: 13px; color: var(--ink); font-weight: 500; }

/* Grok Bot: the desktop app, bots on the left */
.frame-grokbot { border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; }
.frame-grokbot .frame-body { display: grid; grid-template-columns: 196px 1fr; }
.frame-grokbot .sidebar { border-right: 1px solid var(--line); padding: 10px 8px; display: grid; gap: 2px; align-content: start; font-size: 13px; }
.frame-grokbot .bot { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; }
.frame-grokbot .bot.sel { background: var(--card); }
.frame-grokbot .bot .ball { width: 30px; height: 30px; flex: none; }
.frame-grokbot .bot span { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.frame-grokbot .bot small { display: block; color: var(--quiet); font-size: 11px; }
.frame-grokbot .msg-user { border-radius: 999px; }
@media (max-width: 640px) { .frame-grokbot .frame-body { grid-template-columns: 1fr; } .frame-grokbot .sidebar { display: none; } }

/* Muse: a phone, the plush badge over the top */
.phone { position: relative; width: 100%; max-width: 340px; margin: 26px auto 0; border: 1px solid var(--line); border-radius: 34px; background: #f7f7f9; padding: 74px 0 0; }
.phone .chat-body { min-height: 360px; padding: 12px 14px 6px; }
.frame-muse .msg-agent { background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .06); }
.frame-muse .msg-user { background: #dbeafe; color: var(--ink); }

/* dots: chat on the left, the dot's own computer on the right, the dot peeking in */
.frame-dots { border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; }
.frame-dots .frame-body { display: grid; grid-template-columns: 1fr 1fr; }
.frame-dots .chat-col { position: relative; padding-top: 122px; }
.frame-dots .badge { top: 10px; }
.frame-dots .badge .char { width: 68px; height: 68px; border-radius: 0; box-shadow: none; }
.frame-dots .chat-body { min-height: 320px; }
.frame-dots .msg-user { background: #f5d76e; color: var(--ink); }
.frame-dots .pane { position: relative; margin: 10px; border-radius: 12px; background: #f5d76e; padding: 10px; min-height: 280px; overflow: hidden; }
.frame-dots .win { background: #fff; border-radius: 8px; padding: 10px 12px; display: grid; gap: 6px; font-size: 12px; min-height: 64px; }
.frame-dots .win b { font-size: 13px; font-weight: 500; }
.frame-dots .win .from { color: var(--quiet); }
.frame-dots .ctrl { position: absolute; left: 10px; bottom: 10px; display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 999px; padding: 4px 6px 4px 10px; font-size: 11px; box-shadow: 0 2px 8px rgba(0, 0, 0, .1); white-space: nowrap; z-index: 1; }
.frame-dots .ctrl b { font-weight: 500; }
.frame-dots .ctrl span { background: var(--ink); color: #fff; border-radius: 999px; padding: 2px 8px; }
.frame-dots .peek { position: absolute; right: -6px; bottom: -6px; width: 40%; max-width: 160px; pointer-events: none; }
@media (max-width: 640px) { .frame-dots .frame-body { grid-template-columns: 1fr; } .frame-dots .pane { min-height: 200px; margin-top: 0; } }

/* Instinct: iMessage */
.frame-instinct { width: 100%; max-width: 360px; margin: 0 auto; border: 1px solid var(--line); border-radius: 34px; background: #fff; overflow: hidden; }
.imsg-top { display: grid; justify-items: center; gap: 2px; padding: 16px 0 8px; border-bottom: 1px solid var(--line); font-size: 12px; }
.imsg-top .monogram { width: 50px; height: 50px; }
.frame-instinct .chat-body { min-height: 360px; padding: 12px 12px 4px; }
.frame-instinct .msg-agent { background: #e9e9eb; border-radius: 18px; border-bottom-left-radius: 6px; }
.frame-instinct .msg-user { background: #1f8cff; color: #fff; border-radius: 18px; border-bottom-right-radius: 6px; }
.frame-instinct .saves { gap: 8px; margin-top: 8px; }
.frame-instinct .save { background: #fff; border: 0; border-radius: 12px; overflow: hidden; padding: 0 0 8px; }
.frame-instinct .save::before { content: ""; display: block; height: 52px; margin-bottom: 6px; background: linear-gradient(120deg, #ffe3b0, #ffb8a3 55%, #ffb3cc); }
.frame-instinct .save b, .frame-instinct .save span, .frame-instinct .save em { padding: 0 10px; }
.frame-instinct .composer { border-color: #d9d9de; margin: 6px 10px 12px; }

/* Recipes */
.controls { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; margin-bottom: 24px; }
.controls label { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: var(--quiet); }
.controls select { font: inherit; font-size: 15px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }
.recipes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.recipe.wide { grid-column: 1 / -1; grid-template-columns: auto 1fr auto; grid-template-rows: none; align-items: center; gap: 18px 24px; }
.recipe.wide h3 { margin-top: 0; }
.recipe.wide .what { max-width: 40em; }
@media (max-width: 640px) { .recipe.wide { grid-template-columns: 1fr; } }
.recipe { display: grid; grid-template-rows: auto 1fr auto; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card-2); }
.recipe svg { width: 44px; height: 44px; display: block; }
.recipe .title { margin-top: 12px; }
.recipe p { color: var(--quiet); font-size: 15px; }
.recipe .copy { justify-self: start; }
.recipe details { font-size: 14px; }
.recipe summary { cursor: pointer; color: var(--quiet); }
.recipe pre { margin: 10px 0 0; padding: 12px; border-radius: 10px; background: var(--card); white-space: pre-wrap; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; max-height: 320px; overflow: auto; }
.recipe-note { margin-top: 18px; font-size: 15px; color: var(--quiet); max-width: 54ch; }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps li { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card-2); }
.steps li::before { counter-increment: step; content: counter(step); display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: 14px; margin-bottom: 14px; }
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--quiet); font-size: 15px; }

/* Works with */
.works { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.works .agent { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border: 1px solid var(--line); border-radius: 999px; font-weight: 500; font-size: 15px; }
.works .any { color: var(--quiet); font-size: 15px; margin-left: 6px; }

/* FAQ */
.faq { max-width: 720px; }
.faq details { border-top: 1px solid var(--line); padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 500; 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(--quiet); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; color: var(--quiet); max-width: 44em; }

/* Closing */
.closing { text-align: center; padding: 72px 0; }
.closing h2 { margin-bottom: 14px; }
.closing p { color: var(--quiet); font-size: 18px; margin-bottom: 24px; }

footer { border-top: 1px solid var(--line); padding: 24px 0 44px; color: var(--quiet); font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
footer a { color: var(--quiet); }
footer .legal { flex-basis: 100%; }

/* Documents (privacy, 404) */
.doc { padding: 24px 0 48px; max-width: 720px; }
.doc h1 { font-size: 36px; margin-bottom: 10px; }
.doc h2 { font-size: 21px; margin: 32px 0 8px; }
.doc p { margin: 0 0 12px; }
.doc li { margin: 6px 0; }
.doc ul { padding-left: 22px; }

@media (prefers-reduced-motion: reduce) {
  .msg, .task, .task .box, .task .box svg, .cycle .w, .maker-art, .maker-status, .btn { transition: none; }
}
