/* Assistant Hub landing — cinematic hero, rendered by /landing.js from /landing.json.
   Colour, type and radius come from the DESIGN.md tokens declared in landing.html.
   The emblem is a flat graphite image: no spin, no glow, no halo. Dark only: the
   starfield is painted near-black, so the page does not follow the light theme.
   Lime is spent on the primary action only; supporting text is --text-muted on
   the type scale. No purple anywhere (DESIGN.md: kill indigo). */

.space-root {
  --panel-glass: rgba(8, 10, 16, 0.62);
  --btn-glass: rgba(8, 10, 16, 0.45);

  position: relative;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  overflow-x: hidden;
}
.space-root a:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 4px; }
.space-root canvas#space {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  background: var(--bg);
}
.space-root .vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(ellipse at center, transparent 26%, rgba(0, 0, 0, 0.62) 74%, rgba(0, 0, 0, 0.92) 100%);
}

.space-nav,
.space-hero,
.space-root main,
.space-footer {
  position: relative;
  z-index: 4;
}
.space-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 64px;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}
.space-nav .brand { font-weight: 600; letter-spacing: -0.02em; color: var(--text); text-decoration: none; white-space: nowrap; }
.space-nav .brand em { color: var(--text-muted); font-style: normal; }
.space-nav .links { display: flex; gap: 20px; }
.space-nav .links a { color: var(--text-muted); font-size: var(--text-sm); text-decoration: none; }
.space-nav .links a:hover { color: var(--text); }
.space-nav .actions { margin-left: auto; display: flex; gap: 10px; }

.space-btn {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}
.space-btn.secondary {
  border-color: var(--line);
  color: var(--text-muted);
  background: var(--btn-glass);
}
.space-btn.secondary:hover { color: var(--text); border-color: var(--line-strong); }
.space-btn.primary { background: var(--accent); color: var(--text-inverse); }
.space-btn.primary:hover { background: var(--accent-dim); }
.space-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.space-hero {
  min-height: calc(100dvh - 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px 20px 64px;
}
/* The emblem fills its stage; the status light sits at its centre. */
/* The hero under the emblem is about 360px tall, so (viewport - 460px) keeps
   the first button above the fold on a 1280x800 laptop; tall screens get 460. */
.stage {
  position: relative;
  width: clamp(220px, calc(100vh - 460px), min(460px, 86vw));
  height: clamp(220px, calc(100vh - 460px), min(460px, 86vw));
  margin-bottom: 8px;
}
.ring-wrap { position: absolute; inset: 4%; }
.ring-wrap picture { display: block; width: 100%; height: 100%; }
.ring-wrap img { width: 100%; height: 100%; object-fit: contain; }
.core {
  position: absolute;
  inset: 34%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  color: var(--text-muted);
}
.status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-faint);
}
/* The dot is green, and blinks, only when /api/status says operational. */
.status[data-state="operational"] .dot { background: var(--up); box-shadow: 0 0 10px var(--up); animation: blink 1.1s steps(2, end) infinite; }
.status[data-state="degraded"] .dot { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.status[data-state="down"] .dot { background: var(--down); box-shadow: 0 0 10px var(--down); }

.kicker {
  color: var(--text-muted);
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: var(--weight-semibold);
  margin: 0 0 12px;
}
.kicker a { color: inherit; text-decoration: none; border-bottom: 1px dotted currentColor; }
.space-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 60px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: var(--weight-bold);
  margin: 8px 0 14px;
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.65);
}
.lede { color: var(--text-muted); max-width: 640px; font-size: var(--text-lg); margin: 0 auto; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.fine { margin: 12px 0 0; color: var(--text-muted); font-size: var(--text-xs); }

.space-section { padding: 72px 0; }
.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 42px; align-items: start; }
.panel {
  background: var(--panel-glass);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
}
.points { list-style: none; margin: 20px 0 0; padding: 0; }
.points li { padding: 12px 0; border-top: 1px solid var(--line); }
.points strong { display: block; font-weight: var(--weight-medium); }
.points span { color: var(--text-muted); font-size: var(--text-sm); }
.points a { display: inline-block; margin-top: 4px; color: var(--text); font-size: var(--text-sm); text-underline-offset: 3px; }
.card { padding: 16px; border-bottom: 1px solid var(--line); }
.card:last-child { border-bottom: 0; }
.meta { color: var(--text-muted); font-family: var(--font-mono); font-size: var(--text-xs); }
.note { color: var(--text-muted); font-size: var(--text-sm); margin: 8px 0 0; }
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 26px; }
.skill { padding: 18px; min-height: 220px; display: flex; flex-direction: column; gap: 8px; }
.skill p, .step p { color: var(--text-muted); font-size: var(--text-sm); margin: 0; }
.label {
  align-self: flex-start;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--warn);
  border: 1px solid currentColor;
  border-radius: var(--radius-full);
  padding: 3px 8px;
}
/* Set from the live card in /api/skills; the JSON's label is the fallback. */
.label[data-label="forward-tested"], .label[data-label="proven"] { color: var(--up); }
.label[data-label="halted"] { color: var(--down); }
.windows { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 18px 0 4px; }
.window {
  min-width: 52px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line-strong);
  color: var(--text);
  background: rgba(8, 10, 16, 0.55);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.window:hover { border-color: var(--text-muted); }
.window:focus-visible, .step-link:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; width: min(860px, 100%); margin: 28px 0 0; text-align: left; }
.step-link { display: block; height: 100%; box-sizing: border-box; padding: 16px; color: inherit; text-decoration: none; }
.step-link:hover { border-color: var(--line-strong); }
.step-link p { color: var(--text-muted); font-size: var(--text-sm); margin: 0; }
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px; }
.step { padding: 16px; }
.num { color: var(--text-muted); font-family: var(--font-mono); font-size: var(--text-xs); }
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.trust div { padding: 16px; }
.trust strong { display: block; margin-bottom: 4px; }
.trust span { color: var(--text-muted); font-size: var(--text-sm); }
.close { padding: 32px; display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-top: 18px; }
.space-footer {
  padding: 10px 0 40px;
  color: var(--text-muted);
  font-size: var(--text-sm);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.space-footer nav { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.space-footer nav a { color: var(--text-muted); font-size: var(--text-sm); text-decoration: none; }
.space-footer nav a:hover { color: var(--text); }
.space-root h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 40px);
  letter-spacing: -0.03em;
  font-weight: var(--weight-bold);
  line-height: 1.1;
  margin: 0 0 12px;
}
.space-root h3 { margin: 0 0 8px; font-size: var(--text-lg); font-weight: var(--weight-medium); }

@keyframes blink { 50% { opacity: 0.15; } }

@media (max-width: 860px) {
  .space-nav .links { display: none; }
  .split, .skills, .flow, .trust, .steps { grid-template-columns: 1fr; }
  .close { flex-direction: column; align-items: start; }
  /* The window chips push the hero's first button down; without the emblem it
     clears a 390x844 fold. The kicker still carries the live status. */
  .stage { display: none; }
}
/* Phones: 44px targets and 14px+ body text. */
@media (max-width: 720px) {
  .space-nav { gap: 12px; }
  .space-nav .actions .secondary:not(.keep) { display: none; }
  .space-btn { height: 44px; }
  .windows { flex-wrap: nowrap; width: 100%; }
  .window { height: 44px; flex: 1 1 0; min-width: 0; padding: 0; }
  .space-hero { padding: 0 16px 48px; }
  .lede { font-size: var(--text-md); }
  .fine { font-size: var(--text-sm); }
  .space-section { padding: 48px 0; }
  .wrap, .space-nav { width: calc(100% - 32px); }
  .skill { min-height: 0; }
  .close { padding: 24px 20px; }
  .space-footer nav a { font-size: var(--text-sm); line-height: 2.4; }
}
@media (prefers-reduced-motion: reduce) {
  .status .dot { animation: none !important; }
}
