/* hiveminds.online landing page. No scripts, no inline styles (the page's CSP allows neither).
   Palette follows the chat app: dark-adapted Okabe-Ito, with a light variant. */
:root {
  color-scheme: dark light;
  --bg:#0e1116; --surface:#161a21; --raise:#1c222b; --fg:#e6eaf0; --dim:#93a0b4; --line:#242a33;
  --a1:#56b4e9; --a2:#e69f00; --a3:#00c08b; --a4:#e58fbf; --a5:#6fb3ff; --ink:#0b0e12;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg:#f6f7f9; --surface:#fff; --raise:#eef1f5; --fg:#16191d; --dim:#5c6470; --line:#dde1e7;
    --a1:#0072b2; --a2:#b06f00; --a3:#00795c; --a4:#a3537c; --a5:#2b6cb0; --ink:#fff;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
main { overflow: hidden; }

/* ---- nav ---- */
.nav { display: flex; align-items: center; gap: 20px; max-width: 1120px; margin: 0 auto; padding: 18px 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: .01em; }
.logo { width: 20px; height: 20px; background: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22%3E%0A%3Cpolygon points=%2260.91,56.30 50.00,62.60 39.09,56.30 39.09,43.70 50.00,37.40 60.91,43.70%22 fill=%22%23E69F00%22/%3E%0A%3Cpolygon points=%2284.12,69.70 73.21,76.00 62.30,69.70 62.30,57.10 73.21,50.80 84.12,57.10%22 fill=%22%2356B4E9%22/%3E%0A%3Cpolygon points=%2260.91,83.10 50.00,89.40 39.09,83.10 39.09,70.50 50.00,64.20 60.91,70.50%22 fill=%22%2356B4E9%22/%3E%0A%3Cpolygon points=%2237.70,69.70 26.79,76.00 15.88,69.70 15.88,57.10 26.79,50.80 37.70,57.10%22 fill=%22%2356B4E9%22/%3E%0A%3Cpolygon points=%2237.70,42.90 26.79,49.20 15.88,42.90 15.88,30.30 26.79,24.00 37.70,30.30%22 fill=%22%2356B4E9%22/%3E%0A%3Cpolygon points=%2260.91,29.50 50.00,35.80 39.09,29.50 39.09,16.90 50.00,10.60 60.91,16.90%22 fill=%22%2356B4E9%22/%3E%0A%3Cpolygon points=%2284.12,42.90 73.21,49.20 62.30,42.90 62.30,30.30 73.21,24.00 84.12,30.30%22 fill=%22%2356B4E9%22/%3E%0A%3C/svg%3E") center / contain no-repeat; flex: 0 0 auto; }
.links { display: flex; gap: 22px; margin-left: 18px; color: var(--dim); font-size: 15px; }
.links a:hover, .signin:hover, .foot nav a:hover { color: var(--fg); }
.signin { margin-left: auto; color: var(--dim); font-size: 15px; }

/* ---- buttons ---- */
.btn { display: inline-block; background: var(--a1); color: var(--ink); font-weight: 650; border-radius: 12px; padding: 13px 24px; border: 1px solid var(--a1); transition: transform .15s ease, filter .15s ease; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--a1); }
.btn.small { padding: 8px 16px; border-radius: 10px; font-size: 15px; }
.btn.big { padding: 16px 32px; font-size: 18px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 0; }

/* ---- hero ---- */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 32px; align-items: center; max-width: 1120px; margin: 0 auto; padding: 48px 20px 72px; }
.eyebrow { color: var(--a3); font-weight: 600; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 16px; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); letter-spacing: -.03em; font-weight: 750; }
.grad { background: linear-gradient(90deg, var(--a1), var(--a3) 55%, var(--a2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--dim); max-width: 34em; margin: 22px 0 0; }
.fine { color: var(--dim); font-size: 14px; margin: 16px 0 0; }

.hive { width: 100%; max-width: 460px; justify-self: center; }
.hive .links-g line { stroke: var(--line); stroke-width: 2; }
.hive use { fill: var(--surface); stroke: var(--line); stroke-width: 2; }
.cell { animation: rise .7s both cubic-bezier(.2,.8,.2,1); }
.cell rect, .cell circle, .cell path { fill: currentColor; }
.cell .ink { fill: var(--surface); }
.cell .ink-line { stroke: var(--surface); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.cell .stroke { stroke: currentColor; stroke-width: 3; }
.c-core { color: var(--fg); } .c-core use { stroke: var(--a1); }
.c-core .ring { fill: none; stroke: currentColor; stroke-width: 1.5; opacity: .35; animation: pulse 3.2s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.c-core .r2 { animation-delay: .8s; opacity: .2; }
.c1 { color: var(--a1); animation-delay: .08s; } .c2 { color: var(--a2); animation-delay: .16s; }
.c3 { color: var(--a3); animation-delay: .24s; } .c4 { color: var(--a4); animation-delay: .32s; }
.c5 { color: var(--a5); animation-delay: .40s; } .c6 { color: var(--a3); animation-delay: .48s; }
@keyframes rise { from { opacity: 0; transform: scale(.7); } }
.cell { transform-box: fill-box; transform-origin: center; }
@keyframes pulse { 50% { transform: scale(1.12); opacity: .08; } }

/* ---- bands ---- */
.band { max-width: 1120px; margin: 0 auto; padding: 72px 20px; }
.band h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); letter-spacing: -.02em; text-align: center; }
.sub { color: var(--dim); text-align: center; margin: 12px auto 0; max-width: 40em; font-size: 1.05rem; }
.sub.left { text-align: left; margin-left: 0; }
.band.alt { max-width: none; background: var(--surface); border-block: 1px solid var(--line); }
.band.alt > * { max-width: 1080px; margin-left: auto; margin-right: auto; }

.steps { list-style: none; padding: 0; margin: 44px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px 22px; }
.num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font-weight: 700; color: var(--ink); background: var(--a1); margin-bottom: 14px; }
.steps li:nth-child(2) .num { background: var(--a3); } .steps li:nth-child(3) .num { background: var(--a2); }
.steps h3 { font-size: 1.15rem; margin-bottom: 8px; }
.steps p { margin: 0; color: var(--dim); }

.flow { width: 100%; margin: 56px 0 0; overflow: visible; }
.node rect { fill: var(--surface); stroke: var(--line); stroke-width: 2; }
.node text { fill: var(--fg); font: 600 19px system-ui, sans-serif; text-anchor: middle; }
.node text.small { fill: var(--dim); font: 400 14px system-ui, sans-serif; }
.n-you rect { stroke: var(--a4); } .n-group rect { stroke: var(--a5); } .n-disp rect { stroke: var(--a2); }
.n-agent rect { stroke: var(--a3); } .dimmed { opacity: .45; }
.wires path { fill: none; stroke: var(--dim); stroke-width: 2.5; }
.wires .hot { stroke: var(--a3); stroke-width: 3; stroke-dasharray: 8 7; animation: march 1.1s linear infinite; }
.wires .cold { stroke: var(--line); }
.wires .back { stroke: var(--a1); stroke-dasharray: 3 7; stroke-linecap: round; }
.arrowhead { fill: var(--dim); }
.caption { fill: var(--a1); font: 500 14px system-ui, sans-serif; text-anchor: middle; }
@keyframes march { to { stroke-dashoffset: -15; } }

/* ---- services ---- */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 44px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 24px 22px; display: flex; flex-direction: column; transition: transform .15s ease, border-color .15s ease; }
.card:hover { transform: translateY(-3px); border-color: currentColor; }
.card svg { width: 44px; height: 44px; margin-bottom: 16px; fill: currentColor; }
.card .cut { fill: none; stroke: var(--bg); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.card .cut-fill { fill: var(--bg); }
.card h3 { font-size: 1.25rem; color: var(--fg); margin-bottom: 8px; }
.card p { color: var(--dim); margin: 0 0 18px; flex: 1; } .card p b { color: var(--fg); font-weight: 600; overflow-wrap: anywhere; }
.go { font-weight: 600; font-size: 14px; }
.k1 { color: var(--a1); } .k2 { color: var(--a2); } .k3 { color: var(--a4); } .k4 { color: var(--a3); }
.k5 { color: var(--a5); } .k6 { color: var(--a3); }
.card { position: relative; }
.card .new { position: absolute; top: 18px; right: 18px; font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid currentColor; }

/* ---- agents ---- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.split h2 { text-align: left; }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; color: var(--dim); }
.ticks li { padding-left: 30px; position: relative; margin-bottom: 12px; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: .5em; width: 10px; height: 10px; border-radius: 3px; background: var(--a3); transform: rotate(45deg); }
.ticks b { color: var(--fg); }
.code { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; margin: 0; overflow-x: auto; font: 14px/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--fg); }
.code .c { color: var(--dim); } .code b { color: var(--a2); } .code i { color: var(--a1); font-style: normal; }

.final { text-align: center; padding-top: 24px; padding-bottom: 96px; }
.final .cta { justify-content: center; }

/* ---- footer ---- */
.foot { border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 1120px; margin: 0 auto; padding: 24px 20px 40px; color: var(--dim); }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; font-size: 15px; }

/* ---- smaller screens ---- */
@media (max-width: 960px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .links { display: none; }
  .nav { gap: 12px; padding: 14px 16px; }
  .hero { grid-template-columns: 1fr; padding: 24px 16px 48px; gap: 8px; }
  .hive { max-width: 300px; order: -1; }
  .band { padding: 52px 16px; }
  .steps, .split { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .flow { display: none; }
  .cta .btn { flex: 1 1 auto; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .cell, .c-core .ring, .wires .hot { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---- faq ---- */
.faqlist { max-width: 760px; margin: 28px auto 0; }
.faqlist details { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin: 10px 0; padding: 0 18px; }
.faqlist summary { cursor: pointer; font-weight: 650; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faqlist summary::-webkit-details-marker { display: none; }
.faqlist summary::after { content: "+"; color: var(--a1); font-weight: 700; }
.faqlist details[open] summary::after { content: "–"; }
.faqlist p { margin: 0 0 16px; color: var(--dim); }

/* ---- /download (served by the account service: download_page) ---- */
.dlmain { max-width: 1120px; margin: 0 auto; padding: 24px 20px 64px; }
.dlmain h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 28px; }
.dlapp { display: flex; gap: 28px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 28px; }
.dlapp img { border-radius: 22px; flex: 0 0 auto; }
.dlapp h2 { font-size: 1.6rem; margin-bottom: 8px; }
.dlapp p { color: var(--dim); max-width: 640px; }
.dlapp .fine { font-size: 14px; margin-top: 14px; }
.dlapp code { font-size: 12px; overflow-wrap: anywhere; }
.dlapp details { margin-top: 16px; color: var(--dim); }
.dlapp summary { cursor: pointer; color: var(--fg); font-weight: 600; }
.dlapp ol { padding-left: 20px; }
.dlh { margin: 44px 0 0; font-size: 1.4rem; }
.dlgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; }
.card.dl .btn { align-self: flex-start; }
@media (max-width: 860px) { .dlgrid { grid-template-columns: 1fr; } .dlapp { flex-direction: column; padding: 22px; } }

/* The creator, in every footer of the public site. */
.foot .credit { flex-basis: 100%; margin: 4px 0 0; font-size: 14px; color: var(--dim); }
.foot .credit b { color: var(--fg); font-weight: 600; }

/* A page to read (security.html): one column, headings, lists */
.doc { max-width: 820px; margin: 0 auto; padding: 48px 20px 64px; overflow: visible; }
.doc h1 { font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: -.02em; }
.doc h2 { font-size: 1.35rem; margin: 40px 0 10px; }
.doc ul, .doc ol { padding-left: 22px; } .doc li { margin: 8px 0; color: var(--fg); }
.doc p { margin: 10px 0; }
.doc .dim { color: var(--dim); } .doc .small { font-size: 14px; }
.doc code { font-size: .9em; padding: 1px 5px; border-radius: 5px; background: var(--surface); border: 1px solid var(--line); }
.doc .toc { margin: 22px 0 8px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); line-height: 1.9; }
.doc section { scroll-margin-top: 80px; }
.doc .warn { border-left: 4px solid var(--a2); padding: 2px 0 2px 18px; margin-top: 40px; }
.doc .warn h2 { margin-top: 8px; }
/* The home page's short version, with the way to the long one */
.safe { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 36px; }
.safe div { border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: var(--bg); }
.safe h3 { font-size: 1.05rem; margin-bottom: 6px; } .safe p { color: var(--dim); margin: 0; font-size: 15px; }
@media (max-width: 860px) { .safe { grid-template-columns: 1fr; } }
