/* Echo Garden: one synthwave look shared with the Tour and Ideas pages (night sky, neon grid). */
:root {
  --bg: #0b0221;
  --bg-2: #150536;
  --surface: #1a0840;
  --ink: #f4e9ff;
  --ink-soft: #b9a6dc;
  --leaf: #39ff9f;
  --leaf-deep: #22e6ff;
  --leaf-pale: #10291f;
  --terracotta: #ff2bd6;
  --terracotta-deep: #ff5ce0;
  --sun: #ffb238;
  --line: #3b1670;
  --focus: #22e6ff;
  --stage-top: #0b0221;
  --stage-bottom: #5a0f6a;
  --note-3d: #ffb238;
  --ring-3d: #22e6ff;
  --radius: 10px;
  --gutter: 16px;
  --max: 980px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: radial-gradient(120% 60% at 50% 0%, #2a0a52 0%, var(--bg) 55%) fixed, var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: var(--leaf-deep); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */
.top { padding-top: 40px; padding-bottom: 12px; }
h1 {
  margin: 0;
  font-size: clamp(2.2rem, 7vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--leaf-deep);
}
.subtitle { margin: 8px 0 0; font-size: 1.15rem; color: var(--ink-soft); }

/* Hero */
.hero { margin-top: 12px; }
.stage {
  position: relative;
  width: 100%;
  height: clamp(320px, 58vw, 560px);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, var(--stage-top), var(--stage-bottom));
  border: 1px solid var(--line);
}
#hero-canvas { display: block; width: 100%; height: 100%; cursor: grab; }
#hero-canvas:active { cursor: grabbing; }
.captions { position: absolute; inset: 0; pointer-events: none; }
.hero-caption {
  position: absolute;
  left: 0; top: 0;
  padding: 2px 8px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: opacity 0.2s;
}
.fallback {
  display: none;
  position: absolute;
  inset: 0;
  padding: 24px;
  overflow: auto;
  align-content: center;
}
.fallback p { max-width: 60ch; margin: 0 auto 12px; }
.fallback .small { font-size: 0.9rem; color: var(--ink-soft); }
.stage.no-webgl #hero-canvas, .stage.no-webgl .captions { display: none; }
.stage.no-webgl .fallback { display: grid; }
.toggle {
  position: absolute;
  right: 12px; bottom: 12px;
  font: inherit;
  font-size: 0.85rem;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.hint { margin: 8px 2px 0; font-size: 0.85rem; color: var(--ink-soft); }

/* Text */
.prose { margin-top: 28px; }
.pitch {
  font-size: clamp(1.1rem, 2.6vw, 1.35rem);
  line-height: 1.55;
  margin: 0;
  max-width: 62ch;
}
h2 { font-size: 1.5rem; margin: 44px 0 14px; color: var(--terracotta-deep); }
h3 { font-size: 1.05rem; margin: 0 0 4px; color: var(--leaf-deep); }

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
  gap: 14px;
}
.steps li {
  counter-increment: step;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 16px 14px;
}
.steps li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 28px; height: 28px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--leaf-pale);
  color: var(--leaf-deep);
  font-weight: 700;
  font-size: 0.9rem;
}
.steps p { margin: 0; font-size: 0.97rem; }

.callout {
  margin-top: 44px;
}
.callout h2 { margin-top: 0; padding-top: 24px; border-top: 2px dashed var(--line); }
.callout p { max-width: 62ch; }
.button {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--terracotta);
  color: #fffaf0;
  font-weight: 700;
  text-decoration: none;
}
.button:hover { background: var(--terracotta-deep); }


.links {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 14px;
}
.card {
  display: block;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s, border-color 0.15s;
}
.card:hover { transform: translateY(-2px); border-color: var(--leaf); }
.card-title { display: block; font-weight: 700; color: var(--leaf-deep); font-size: 1.1rem; }
.card-text { display: block; margin-top: 4px; font-size: 0.95rem; color: var(--ink-soft); }

.foot {
  margin-top: 56px;
  padding-top: 20px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.foot-title { font-size: 0.95rem; margin: 0 0 6px; color: var(--ink-soft); }
.foot ul { margin: 0; padding-left: 18px; }
.foot a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  .card, .hero-caption { transition: none; }
  .card:hover { transform: none; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .top { padding-top: 28px; }
  .stage { height: 380px; }
  .hero-caption { font-size: 0.72rem; padding: 1px 6px; }
}

/* signal path */
.flow { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; overflow-x: auto; }
.flow svg { display: block; min-width: 640px; width: 100%; height: auto; }
.flow text { font-family: var(--font); fill: var(--ink); }
.flow .lab { font-size: 15px; font-weight: 700; }
.flow .sub { font-size: 12px; fill: var(--ink-soft); }
.flow .sub.strong { fill: var(--leaf-deep); font-weight: 600; }
.flow .box { fill: var(--surface); stroke: var(--line); stroke-width: 1.5; }
.flow .box.live { fill: var(--leaf-pale); stroke: var(--leaf); }
.flow .box.hub { fill: var(--bg-2); stroke: var(--terracotta); }
.flow .box.x { fill: none; stroke: var(--ink-soft); stroke-dasharray: 6 5; }
.flow .ar { stroke: var(--leaf-deep); stroke-width: 2; fill: none; }
.flow .ar.x { stroke: var(--ink-soft); stroke-width: 1.5; stroke-dasharray: 6 5; }
.flow .head { fill: var(--leaf-deep); }
.flow .head.x { fill: var(--ink-soft); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 0.9rem; color: var(--ink-soft); margin: 10px 0 0; }
.legend .key { display: inline-block; width: 28px; margin-right: 8px; vertical-align: middle; border-top: 2px solid var(--leaf-deep); }
.legend .key.x { border-top: 2px dashed var(--ink-soft); }
.open { max-width: 62ch; margin-top: 14px; }

/* Synthwave type: neon headings in the same monospace as the Tour and Ideas pages. */
h1, h2, h3, .card-title, .kicker { font-family: var(--mono); letter-spacing: 0.01em; }
h1 { color: var(--terracotta); text-shadow: 0 0 18px #ff2bd666; }
h2 { color: var(--leaf-deep); text-shadow: 0 0 12px #22e6ff44; }
.steps h3 { color: var(--sun); }
.button { color: #12052b; }
.stage { border-color: var(--line); box-shadow: 0 0 40px #ff2bd622; }
