/* MutualOS marketing site. Plain CSS, no build step.
   Layout: a 72rem column on a hairline grid; centred hero over a faint grid with one soft glow, the product shown
   in window frames from real screenshots of the demo book; monochrome, with colour only in status pills. */
:root {
  --bg: #ffffff;
  --bg-2: #fafafa;
  --fg: #0a0a0a;
  --muted: #5e5e5e;
  --line: #e8e8e8;
  --line-strong: #d4d4d4;
  --surface: #ffffff;
  --glow-a: rgba(13, 148, 136, 0.18);
  --glow-b: rgba(59, 130, 246, 0.14);
  --grid: rgba(0, 0, 0, 0.045);
  --accent: #0d7a6c;
  --built-bg: #e7f6f2;
  --built-fg: #0b6b5e;
  --coming-bg: #fdf3e2;
  --coming-fg: #8a5207;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 40px -12px rgba(0, 0, 0, 0.18);
  --font: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.2rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.9rem, 3.6vw, 2.75rem);
  --step-4: clamp(2.5rem, 6.4vw, 4.75rem);
  --wide: 72rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-2: #0a0a0a;
    --fg: #ededed;
    --muted: #a1a1a1;
    --line: #1f1f1f;
    --line-strong: #2e2e2e;
    --surface: #0a0a0a;
    --glow-a: rgba(45, 212, 191, 0.16);
    --glow-b: rgba(96, 165, 250, 0.14);
    --grid: rgba(255, 255, 255, 0.05);
    --accent: #5eead4;
    --built-bg: #0d2a25;
    --built-fg: #6ee7d2;
    --coming-bg: #2e2109;
    --coming-fg: #f5c46a;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 20px 60px -20px rgba(0, 0, 0, 0.9);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000;
  --bg-2: #0a0a0a;
  --fg: #ededed;
  --muted: #a1a1a1;
  --line: #1f1f1f;
  --line-strong: #2e2e2e;
  --surface: #0a0a0a;
  --glow-a: rgba(45, 212, 191, 0.16);
  --glow-b: rgba(96, 165, 250, 0.14);
  --grid: rgba(255, 255, 255, 0.05);
  --accent: #5eead4;
  --built-bg: #0d2a25;
  --built-fg: #6ee7d2;
  --coming-bg: #2e2109;
  --coming-fg: #f5c46a;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 20px 60px -20px rgba(0, 0, 0, 0.9);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 var(--step-0)/1.6 var(--font); -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: var(--fg); text-underline-offset: 0.2em; text-decoration-color: var(--line-strong); }
a:hover { text-decoration-color: currentColor; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.035em; line-height: 1.08; text-wrap: balance; }
h1 { font-size: var(--step-4); letter-spacing: -0.05em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.02em; line-height: 1.3; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: 0.9em; }

.wrap { max-width: var(--wide); margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* Header */
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.6) blur(12px); -webkit-backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 1.25rem; padding-block: 0.65rem; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--fg); text-decoration: none; font-weight: 600; letter-spacing: -0.03em; font-size: 1.08rem; flex: none; }
.brand svg { width: 24px; height: 24px; }
.nav { display: flex; gap: 0.1rem; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--muted); text-decoration: none; font-size: var(--step--1); padding: 0.35rem 0.6rem; border-radius: 999px; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); background: var(--bg-2); }
.head-cta { flex: none; margin-left: auto; }
@media (max-width: 760px) { .site-head .wrap { flex-wrap: wrap; row-gap: 0.4rem; } .nav { order: 3; flex-basis: 100%; } }

/* Buttons: one filled, one outlined */
.btn { display: inline-flex; align-items: center; gap: 0.45rem; font: 500 var(--step--1)/1 var(--font); padding: 0.72rem 1.15rem; border-radius: 999px; text-decoration: none; border: 1px solid transparent; white-space: nowrap; transition: background 0.15s, border-color 0.15s; }
.btn-primary, .btn-light { background: var(--fg); color: var(--bg); }
.btn-primary:hover, .btn-light:hover { background: color-mix(in srgb, var(--fg) 82%, var(--bg)); }
.btn-ghost, .btn-outline { background: var(--bg); color: var(--fg); border-color: var(--line-strong); }
.btn-ghost:hover, .btn-outline:hover { background: var(--bg-2); }
.head-cta.btn { padding: 0.5rem 0.9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Hero: a faint grid with a soft glow behind the product */
.band { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.band::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 40%, transparent 100%); -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 40%, transparent 100%); }
.band::after { content: ""; position: absolute; left: 50%; top: -12rem; width: min(70rem, 140%); height: 36rem; transform: translateX(-50%); pointer-events: none; background: radial-gradient(closest-side at 35% 50%, var(--glow-a), transparent), radial-gradient(closest-side at 65% 55%, var(--glow-b), transparent); filter: blur(10px); }
.band > .wrap { position: relative; z-index: 1; }
.hero .wrap { padding-block: 5.5rem 4rem; display: grid; gap: 1.25rem; justify-items: center; text-align: center; }
.hero h1 { max-width: 16ch; }
.hero .lede { color: var(--muted); font-size: var(--step-1); line-height: 1.55; max-width: 40rem; }
.hero .btn-row { justify-content: center; margin-top: 0.75rem; }
.hero.page .wrap { padding-block: 4.5rem 3.5rem; }
.hero.page h1 { font-size: var(--step-3); max-width: 24ch; }
.hero .shot { margin-top: 3rem; width: 100%; text-align: left; }
.eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; font: 500 0.75rem/1 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.hero .eyebrow { border: 1px solid var(--line-strong); border-radius: 999px; padding: 0.4rem 0.75rem; background: var(--bg); }

/* Product frames */
.shot { margin: 0; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.shot-bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--line); background: var(--bg-2); font: 400 0.75rem/1 var(--mono); color: var(--muted); }
.shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.shot-bar span { margin-left: 0.6rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot img { width: 100%; height: auto; }
.shot-note { margin-top: 0.75rem; font-size: 0.8rem; color: var(--muted); text-align: center; }
.split { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 3rem; align-items: center; }
.split.flip { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.split.flip > :first-child { order: 2; }
.split .section-head { margin-bottom: 0; }
.split ul { margin: 1rem 0 0; padding-left: 1.1rem; color: var(--muted); display: grid; gap: 0.35rem; }
@media (max-width: 900px) { .split, .split.flip { grid-template-columns: minmax(0, 1fr); gap: 2rem; } .split.flip > :first-child { order: 0; } }

/* Sections */
section.block { border-bottom: 1px solid var(--line); }
section.block .wrap { padding-block: 5rem; }
.section-head { max-width: 42rem; margin-bottom: 2.5rem; display: grid; gap: 0.85rem; }
.section-head p { color: var(--muted); font-size: var(--step-1); line-height: 1.55; }

/* Grids and cards: cards share hairlines like a bento */
.grid { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); gap: 1px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--surface); padding: 1.6rem; display: grid; gap: 0.6rem; align-content: start; min-width: 0; }
.card p, .card li { color: var(--muted); }
.card ul { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.3rem; }
.card a { font-size: var(--step--1); font-weight: 500; }
.kicker { font: 500 0.72rem/1 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }

.audiences { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.audiences > div { background: var(--surface); padding: 1.6rem; display: grid; gap: 0.5rem; align-content: start; min-width: 0; }
.audiences p { color: var(--muted); }
@media (max-width: 760px) { .audiences { grid-template-columns: minmax(0, 1fr); } }

/* Principles: numbered, because the order is the argument */
.principles { list-style: none; margin: 0; padding: 0; counter-reset: p; border-top: 1px solid var(--line); }
.principles > li { counter-increment: p; display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; padding-block: 2rem; border-bottom: 1px solid var(--line); }
.principles > li::before { content: counter(p, decimal-leading-zero); font: 500 0.85rem/1.7 var(--mono); color: var(--muted); }
.principles h3 { margin-bottom: 0.5rem; }
.principles .means { color: var(--muted); }
.principles .held { font-size: var(--step--1); color: var(--muted); background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.1rem; align-self: start; }
.principles .held strong { display: block; color: var(--fg); font: 500 0.7rem/1.4 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 0.35rem; }
@media (max-width: 860px) { .principles > li { grid-template-columns: 2.5rem minmax(0, 1fr); } .principles .held { grid-column: 2; } }

/* Status pills: the only colour on the page */
.pill { display: inline-block; font: 500 0.68rem/1 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; padding: 0.3rem 0.5rem; border-radius: 999px; white-space: nowrap; vertical-align: 0.1em; }
.pill.built { background: var(--built-bg); color: var(--built-fg); }
.pill.connect { background: var(--bg); color: var(--fg); border: 1px solid var(--line-strong); }
.pill.coming { background: var(--coming-bg); color: var(--coming-fg); }
.legend { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; color: var(--muted); font-size: var(--step--1); margin-bottom: 1.5rem; }
.legend span { display: inline-flex; gap: 0.5rem; align-items: center; }

/* Tables */
.table-box { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; min-width: 40rem; }
th, td { text-align: left; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 500 0.7rem/1.3 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); background: var(--bg-2); }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 500; width: 26%; }
td:last-child { width: 1%; }
td p { color: var(--muted); font-size: var(--step--1); }
.group-title { margin: 3rem 0 1rem; display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap; }
.group-title h2 { font-size: var(--step-2); }
.group-title p { color: var(--muted); }

/* Callouts and CTA */
.note { border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); padding: 1.1rem 1.25rem; color: var(--muted); }
.note strong { color: var(--fg); font-weight: 600; }
.cta { border-bottom: 0; }
.cta .wrap { padding-block: 5rem; display: grid; justify-items: center; text-align: center; gap: 1.25rem; }
.cta h2 { max-width: 22ch; }
.cta p { color: var(--muted); max-width: 38rem; }
.cta .btn-row { justify-content: center; }

/* Steps: a real sequence */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.steps li { counter-increment: s; background: var(--surface); padding: 1.4rem; display: grid; gap: 0.45rem; align-content: start; }
.steps li::before { content: counter(s, decimal-leading-zero); font: 500 0.75rem/1 var(--mono); color: var(--muted); }
.steps p { color: var(--muted); font-size: var(--step--1); }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* Long-form reading (white paper) */
.prose { max-width: 42rem; min-width: 0; }
.prose > * + * { margin-top: 1.1rem; }
.prose h2 { font-size: var(--step-2); margin-top: 3.25rem; }
.prose h3 { margin-top: 2rem; }
.prose p, .prose li { font-size: 1.06rem; line-height: 1.72; }
.prose li { color: var(--fg); }
.prose ul, .prose ol { padding-left: 1.3rem; display: grid; gap: 0.5rem; }
.prose blockquote { margin: 1.75rem 0; padding: 0 0 0 1.25rem; border-left: 2px solid var(--fg); font-size: var(--step-1); line-height: 1.45; font-weight: 500; letter-spacing: -0.02em; }
.prose .shot { margin-top: 1.75rem; }
.paper { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 3.5rem; }
.toc { position: sticky; top: 5.5rem; align-self: start; font-size: var(--step--1); display: grid; gap: 0.45rem; border-left: 1px solid var(--line); padding-left: 1rem; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--fg); }
@media (max-width: 900px) { .paper { grid-template-columns: minmax(0, 1fr); } .toc { position: static; } }

/* Footer */
.site-foot { border-top: 1px solid var(--line); color: var(--muted); font-size: var(--step--1); background: var(--bg-2); }
.site-foot .wrap { padding-block: 2.5rem 3rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--fg); }

@media (prefers-reduced-motion: no-preference) {
  .hero .shot { animation: lift 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  @keyframes lift { from { transform: translateY(14px); opacity: 0.4; } to { transform: none; opacity: 1; } }
}
.section-head .btn { justify-self: start; }

/* Logo colours (no inline styles, so the site's CSP needs no 'unsafe-inline') */
.brand svg rect { fill: var(--fg); }
.brand svg path { stroke: var(--bg); }
.head-cta + .head-demo { margin-left: 0; }
.head-demo.btn { padding: 0.5rem 0.9rem; flex: none; }

/* Sign in */
.signin { display: grid; gap: 0.6rem; max-width: 30rem; margin: 1.75rem auto 0; text-align: left; }
.signin label { font-weight: 500; }
.signin-row { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); overflow: hidden; }
.signin-row:focus-within { outline: 2px solid var(--fg); outline-offset: 2px; }
.signin input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--fg); font: 500 1rem/1.2 var(--mono); padding: 0.8rem 0.9rem; outline: none; }
.signin .suffix { padding-right: 0.9rem; color: var(--muted); font-size: 0.95rem; }
.signin .help { margin: 0; color: var(--muted); font-size: 0.9rem; }
.signin .error { margin: 0; color: var(--danger, #c4302b); font-size: 0.9rem; }
.signin [aria-invalid="true"] { color: var(--danger, #c4302b); }
.signin .btn { justify-self: start; }
