/* Greysight public site. Plain CSS, no build step. Brand: near-black #0B0B12,
   violet #8B5CF6, cyan #22D3EE, Inter. Light by default, dark on OS preference,
   either pinned by the header toggle (site.js sets data-theme). The logo PNGs
   carry a solid background, so --bg must stay exactly #FFFFFF / #0B0B12. */
/* Inter, self-hosted (Google Fonts would send every visitor's IP to Google before consent). */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/assets/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/assets/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --bg: #FFFFFF; --fg: #0B0B12; --muted: #52525B; --line: #E4E4E7;
  --soft: #F5F5F8; --card: #FFFFFF;
  --primary: #6D28D9; --primary-ink: #FFFFFF; --primary-hover: #5B21B6;
  --violet: #8B5CF6; --cyan: #22D3EE; --good: #10B981; --warn: #F59E0B; --bad: #EF4444;
  --shadow: 0 1px 2px rgba(11,11,18,.06), 0 12px 40px -12px rgba(11,11,18,.18);
  --radius: 12px; --max: 1120px;
  --show-light: inline; --show-dark: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0B12; --fg: #FAFAFA; --muted: #A1A1AA; --line: #26262E;
    --soft: #14141C; --card: #111119;
    --primary: #A78BFA; --primary-ink: #0B0B12; --primary-hover: #C4B5FD;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 16px 48px -12px rgba(139,92,246,.25);
    --show-light: none; --show-dark: inline;
  }
}
:root[data-theme="dark"] {
  --bg: #0B0B12; --fg: #FAFAFA; --muted: #A1A1AA; --line: #26262E;
  --soft: #14141C; --card: #111119;
  --primary: #A78BFA; --primary-ink: #0B0B12; --primary-hover: #C4B5FD;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 16px 48px -12px rgba(139,92,246,.25);
  --show-light: none; --show-dark: inline;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-optical-sizing: auto; -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
.light-only { display: var(--show-light); }
.dark-only { display: var(--show-dark); }

/* Header */
header.site { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 40px; width: auto; margin-left: -12px; }
nav.site { display: flex; align-items: center; gap: 22px; }
nav.site a { color: var(--muted); font-size: 15px; font-weight: 500; }
nav.site a:hover { color: var(--fg); text-decoration: none; }
nav.site a.cta { color: var(--fg); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; }
nav.site a.cta:hover { border-color: var(--fg); }
nav.site button.theme { padding: 0; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; }
nav.site button.theme:hover { color: var(--fg); border-color: var(--fg); }
@media (max-width: 720px) { nav.site a:not(.cta) { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--primary); color: var(--primary-ink); font-weight: 600; padding: 13px 22px; border-radius: 999px; font-size: 15px; transition: background .15s; }
.btn:hover { background: var(--primary-hover); text-decoration: none; }
.btn.secondary { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn.secondary:hover { background: var(--soft); border-color: var(--fg); }

/* Hero */
.hero { position: relative; padding: 88px 0 56px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -40% -20% auto; height: 120%; background: radial-gradient(60% 50% at 30% 30%, rgba(139,92,246,.18), transparent 70%), radial-gradient(40% 40% at 80% 20%, rgba(34,211,238,.14), transparent 70%); pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero .wrap > * { min-width: 0; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--primary); margin-bottom: 18px; }
.hero h1 { font-size: clamp(38px, 5.4vw, 60px); font-weight: 800; }
.hero h1 .grad { background: linear-gradient(90deg, var(--violet), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 540px; margin: 22px 0 30px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.actions .small { font-size: 14px; color: var(--muted); margin-left: 4px; }
@media (max-width: 900px) { .hero { padding: 56px 0 40px; } .hero .wrap { grid-template-columns: 1fr; gap: 40px; } }

/* Product illustration: a stylised Greysight dashboard, made-up numbers */
.shot { background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 18px; font-size: 13px; }
.shot .bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.shot .bar b { font-size: 15px; }
.shot .bar span { color: var(--muted); font-size: 12px; }
.shot .pill { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.tile { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.tile .k { color: var(--muted); font-size: 12px; }
.tile .v { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin: 2px 0 4px; font-variant-numeric: tabular-nums; }
.tile .d { font-size: 12px; font-weight: 600; }
.up { color: var(--good); } .down { color: var(--bad); }
.chart { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 12px; }
.chart svg { display: block; width: 100%; height: 88px; }
.recs { display: grid; gap: 8px; }
.rec { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.rec .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.rec .t { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec .m { color: var(--muted); font-size: 12px; white-space: nowrap; }
@media (max-width: 420px) { .tiles { grid-template-columns: 1fr 1fr; } .tile:last-child { display: none; } }

/* Sections */
section { padding: 64px 0; }
section.alt { background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 38px); font-weight: 700; margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 17px; margin: 0; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.steps li { padding-top: 20px; border-top: 2px solid transparent; border-image: linear-gradient(90deg, var(--violet), var(--cyan)) 1; }
.steps .t { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.steps .n { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--soft); border: 1px solid var(--line); color: var(--primary); font-weight: 700; font-size: 13px; }
.steps h3 { font-size: 19px; font-weight: 600; margin: 0; }
.steps p { color: var(--muted); margin: 0; font-size: 15px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 24px; } }
/* How it works: flow diagram. Nodes are HTML; site.js draws the connectors into the SVG from their positions. */
.pipe { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 48px; padding: 40px; margin-bottom: 48px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); }
.pipe-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.pipe .col { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 14px; }
.pipe .col.in { align-items: flex-start; }
.pipe .col.out { align-items: flex-end; }
.pipe .node { display: flex; align-items: center; gap: 10px; width: 200px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); font-size: 14px; font-weight: 600; white-space: nowrap; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.pipe .node svg { flex: 0 0 auto; color: var(--primary); }
.pipe .core img { width: 22px; height: 22px; }
.pipe .core { width: auto; padding: 18px 24px; font-size: 18px; font-weight: 700; border-radius: 16px; border: 1px solid transparent;
  background: linear-gradient(var(--card), var(--card)) padding-box, linear-gradient(135deg, var(--violet), var(--cyan)) border-box;
  animation: corePulse 2.4s ease-in-out infinite; }
.pipe .core .ai { font-size: 11px; font-weight: 700; letter-spacing: .06em; padding: 3px 8px; border-radius: 999px; color: #fff; background: linear-gradient(135deg, var(--violet), var(--cyan)); }
@keyframes corePulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(139,92,246,.35); } 50% { box-shadow: 0 0 0 16px rgba(139,92,246,0); } }
.pipe-lines path { fill: none; stroke: var(--line); stroke-width: 2; }
.pipe-lines path.flow { stroke: url(#pipeGrad); stroke-dasharray: 5 11; stroke-linecap: round; animation: dash 1.2s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -32; } }
.pipe-lines circle { fill: #fff; stroke: var(--cyan); stroke-width: 2; filter: drop-shadow(0 0 5px rgba(34,211,238,.9)); }
@media (max-width: 760px) {
  .pipe { grid-template-columns: 1fr; row-gap: 36px; padding: 24px 16px; }
  .pipe .col.in, .pipe .col.out { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; }
  .pipe .col.mid { align-items: center; }
  .pipe .node { width: calc(33.333% - 6px); font-size: 12px; padding: 8px 10px; gap: 7px; border-radius: 10px; }
  .pipe .node svg { width: 14px; height: 14px; }
  .pipe .col.in, .pipe .col.out { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .pipe-lines path.flow, .pipe .core { animation: none; }
  .pipe-lines circle { display: none; }
}
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.card .icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 18px; background: linear-gradient(135deg, rgba(139,92,246,.18), rgba(34,211,238,.18)); color: var(--primary); }
.card h3 { font-size: 19px; font-weight: 600; margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.audience { margin: 28px 0 0; color: var(--muted); font-size: 16px; }

/* Demo request */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.contact h2 { font-size: clamp(28px, 3.4vw, 38px); font-weight: 700; margin-bottom: 12px; }
.contact p { color: var(--muted); font-size: 17px; margin: 0; }
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; gap: 28px; } }
form#demo { display: grid; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; box-shadow: var(--shadow); }
form#demo label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; }
form#demo .opt { color: var(--muted); font-weight: 400; }
form#demo input, form#demo textarea { font: inherit; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; }
form#demo input:focus, form#demo textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: transparent; }
form#demo .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
form#demo button { justify-self: start; border: 0; cursor: pointer; }
form#demo button[disabled] { opacity: .6; cursor: default; }
.form-msg { margin: 0; font-size: 14px; color: var(--muted); min-height: 1.4em; }
.form-msg.ok { color: var(--good); } .form-msg.err { color: var(--bad); }

/* Documents (privacy, terms, data deletion, support) */
main.doc { padding: 56px 0 72px; }
article { max-width: 760px; }
article h1 { font-size: clamp(30px, 4vw, 40px); font-weight: 700; margin-bottom: 8px; }
article .meta { color: var(--muted); margin: 0 0 32px; }
article h2 { font-size: 22px; font-weight: 600; margin: 40px 0 10px; }
article h3 { font-size: 17px; font-weight: 600; margin: 24px 0 6px; }
article p, article li { color: var(--fg); }
article table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 12px 0; }
article th, article td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
article th { color: var(--muted); font-weight: 600; }
article .toc { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin: 0 0 24px; }
article .toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 24px; }
@media (max-width: 600px) { article .toc ol { columns: 1; } }
.note { border-left: 3px solid var(--primary); background: var(--soft); padding: 10px 14px; border-radius: 0 var(--radius) var(--radius) 0; margin: 16px 0; }
code { font-size: 0.95em; background: var(--soft); padding: 1px 5px; border-radius: 4px; }

/* Footer */
footer.site { border-top: 1px solid var(--line); padding: 28px 0 44px; color: var(--muted); font-size: 14px; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; }
footer.site .links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--fg); }
