/* Futuristic layer shared by every page: grid backdrop, agent-network canvas,
   and the agent console that narrates the site. Pages commit to the dark theme
   (data-theme="dark" on <html>), so these styles only use the page tokens. */
:root {
  --fx-glow: color-mix(in srgb, var(--accent) 22%, transparent);
  --fx-grid: color-mix(in srgb, var(--accent) 7%, transparent);
  --fx-think: var(--muted);
  --fx-act: var(--accent);
  --fx-observe: var(--done);
  --fx-review: var(--progress);
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 520px at 78% -8%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    linear-gradient(var(--fx-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--fx-grid) 1px, transparent 1px);
  background-size: 100% 100%, 44px 44px, 44px 44px;
  background-attachment: fixed, fixed, fixed;
}

/* hero network canvas */
.hero { position: relative; overflow: hidden; }
.hero > .wrap { position: relative; z-index: 1; }
.fx-net { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .75;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 45%, #000 100%); mask-image: linear-gradient(90deg, transparent 0%, #000 45%, #000 100%); }
@media (max-width: 760px) { .fx-net { opacity: .35; -webkit-mask-image: none; mask-image: none; } }

.hero h1 em { text-shadow: 0 0 28px var(--fx-glow); }

/* ---------- agent console ---------- */
.console { margin-top: 26px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(6px); box-shadow: 0 0 0 1px var(--fx-glow), 0 18px 60px -20px var(--fx-glow); overflow: hidden; max-width: 760px; }
.console-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.console-id { display: inline-flex; align-items: center; gap: 9px; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.console-id b { color: var(--fg); font-weight: 500; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--done); box-shadow: 0 0 0 0 color-mix(in srgb, var(--done) 60%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.console-actions { display: flex; gap: 8px; }
.fx-btn { font-family: var(--mono); font-size: 0.75rem; display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); cursor: pointer; }
.fx-btn:hover { border-color: var(--accent); color: var(--accent); }
.fx-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fx-btn.primary { border-color: var(--accent); color: var(--accent); }
.fx-btn[aria-pressed="true"] { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.fx-btn svg { width: 14px; height: 14px; fill: currentColor; }
.console-body { padding: 14px 16px 16px; font-family: var(--mono); font-size: 0.86rem; line-height: 1.6; display: flex; flex-direction: column; gap: 6px; min-height: 9.5em; }
.cl { display: grid; grid-template-columns: 5.6rem minmax(0, 1fr); gap: 10px; }
.cl .k { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; padding-top: 2px; }
.cl .t { color: var(--fg); overflow-wrap: anywhere; }
.cl.think .k { color: var(--fx-think); }
.cl.think .t { color: var(--muted); }
.cl.act .k { color: var(--fx-act); }
.cl.observe .k { color: var(--fx-observe); }
.cl.review .k { color: var(--fx-review); }
.cl.say .k { color: var(--fg); }
.cl.say .t { font-family: var(--body); font-size: 1rem; }
.cl.speaking .t { text-shadow: 0 0 18px var(--fx-glow); }
.caret { display: inline-block; width: 0.55em; height: 1.05em; background: var(--accent); vertical-align: -2px; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 480px) { .cl { grid-template-columns: 1fr; gap: 0; } }
@media (prefers-reduced-motion: reduce) { .pulse, .caret { animation: none; } }

/* glow on primary interactive surfaces */
.goal:hover, .cell:hover, .tool:hover, .stage:hover { box-shadow: 0 0 0 1px var(--fx-glow), 0 10px 30px -18px var(--fx-glow); }
