/* PointMint Agent Network — three.js preview
   Brand tokens from the live site. One accent (mint). Dark only. */

:root {
  color-scheme: dark;
  --bg: #05070a;
  --surface: rgba(16, 18, 22, 0.72);
  --surface-solid: #14161a;
  --text: #f5f5f7;
  --text-body: #d1d1d6;
  --text-2: #a1a1a6;
  --text-3: #8e8e93;
  --hairline: rgba(255, 255, 255, 0.10);
  --hairline-strong: rgba(255, 255, 255, 0.16);
  --accent: #3dd9c1;
  --accent-press: #2cc4ad;
  --accent-ink: #00201c;
  --accent-soft: rgba(61, 217, 193, 0.12);
  --focus: rgba(61, 217, 193, 0.5);
  --human: #e8a05a;
  --you: #5aa8ff;
  --ok: #30d158;
  --warn: #ff9f0a;
  --bad: #ff6961;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --r-pill: 999px;
  --r-chip: 6px;
  --r-thumb: 12px;
  --r-card: 18px;
  --r-panel: 22px;
  --r-hero: 28px;
  --pad-x: 22px;
  --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --glass: rgba(10, 12, 16, 0.62);
  --sh-panel: 0 0 0 1px rgba(255, 255, 255, 0.07), 0 24px 60px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.012em;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, p, ol, ul, figure, blockquote { margin: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 650; letter-spacing: -0.03em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, svg { display: block; }
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
code, pre { font-family: var(--mono); }
::selection { background: var(--accent-soft); }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip {
  position: absolute; left: 12px; top: 12px; z-index: 80;
  background: var(--surface-solid); color: var(--text);
  padding: 10px 16px; border-radius: var(--r-pill);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }
.ic { flex: none; width: 16px; height: 16px; }
.num { font-variant-numeric: tabular-nums; }

#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  background: radial-gradient(ellipse at 50% 40%, #0c1518 0%, #05070a 55%, #030406 100%);
  cursor: grab;
  touch-action: none;
}
#stage.is-dragging { cursor: grabbing; }
body.is-fallback #stage { display: none; }

.fallback {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 50% 35%, rgba(61, 217, 193, 0.16), transparent 42%),
    radial-gradient(ellipse at 30% 70%, rgba(232, 160, 90, 0.12), transparent 40%),
    radial-gradient(ellipse at 70% 60%, rgba(90, 168, 255, 0.10), transparent 38%),
    #05070a;
  display: grid;
  place-items: end center;
  padding: 24px;
  color: var(--text-2);
  font-size: 13px;
  pointer-events: none;
}
.fallback[hidden] { display: none; }

.hint {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 6;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: rgba(8, 10, 14, 0.55);
  border: 1px solid var(--hairline);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  color: var(--text-2);
  font-size: 12px;
  letter-spacing: 0.01em;
  pointer-events: none;
  opacity: 1;
  transition: opacity 600ms var(--ease-out-quart);
}
.hint.is-faded { opacity: 0; }
.hint[hidden] { display: none; }

.tooltip {
  position: fixed;
  z-index: 20;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(12, 14, 18, 0.88);
  border: 1px solid var(--hairline);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 14px));
  white-space: nowrap;
  max-width: min(280px, 80vw);
  box-shadow: var(--sh-panel);
}
.tooltip[hidden] { display: none; }
.tooltip b { font-weight: 600; }
.tooltip .meta { display: block; color: var(--text-2); font-size: 12px; margin-top: 2px; }

/* HUD */
.hud {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px var(--pad-x);
  padding-top: max(10px, env(safe-area-inset-top));
  background: linear-gradient(to bottom, rgba(5, 7, 10, 0.72), rgba(5, 7, 10, 0));
  pointer-events: none;
}
.hud > * { pointer-events: auto; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.02em;
  text-decoration: none;
  min-height: 40px;
}
.brand:hover { text-decoration: none; color: var(--text); }
.brand-mark { width: 28px; height: 28px; flex: none; }
.bm-bg { fill: #1d1d1f; }
.bm-fg { fill: var(--accent); }
.brand-sub { font-weight: 500; color: var(--text-body); }
.brand-tag { color: var(--accent); font-weight: 500; font-size: 12.5px; }
.hud-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.me-btn, .cx-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.me-btn { background: #2a6dff; }
.me-btn:hover { background: #3b78ff; }
.cx-btn { background: #e8b84a; color: #1a1204; }
.cx-btn:hover { background: #f0c45c; }
.cx-btn.is-armed { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #e8b84a; }
.ribbon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 6px 10px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--hairline);
  color: var(--text-2);
  font-size: 11.5px;
  white-space: nowrap;
}
.ribbon b { color: var(--text); font-weight: 650; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-press); text-decoration: none; color: var(--accent-ink); }
.btn.small { height: 40px; padding: 0 14px; font-size: 13px; }
.btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--hairline-strong);
}
.btn.secondary:hover { background: rgba(255, 255, 255, 0.14); color: var(--text); }

/* Hero */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 120px var(--pad-x) 72px;
}
.hero-copy {
  max-width: 620px;
  padding: 28px 28px 24px;
  border-radius: var(--r-hero);
  background: var(--glass);
  border: 1px solid var(--hairline);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  box-shadow: var(--sh-panel);
  transform: translateY(16px);
  opacity: 0;
  animation: rise 800ms var(--ease-spring) 120ms forwards;
}
.eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}
.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.05;
  font-weight: 650;
  letter-spacing: -0.035em;
}
.lede {
  margin-top: 14px;
  color: var(--text-body);
  font-size: 17px;
  line-height: 1.5;
  max-width: 46ch;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.gesture { display: none; margin: 16px 0 0; font-size: 12.5px; }
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  list-style: none;
  padding: 16px 0 0;
  margin-top: 18px;
  border-top: 1px solid var(--hairline);
  color: var(--text-2);
  font-size: 12.5px;
}
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.swatch {
  width: 8px; height: 8px; border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}
.swatch.human { background: var(--human); color: var(--human); }
.swatch.agent { background: var(--accent); color: var(--accent); }
.swatch.you { background: var(--you); color: var(--you); }
.swatch.work { background: var(--accent); color: var(--accent); animation: pulse-dot 1.8s ease-out infinite; }
.swatch.idle { background: #3a5a56; box-shadow: none; }

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(61, 217, 193, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(61, 217, 193, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 217, 193, 0); }
}
@keyframes rise {
  to { transform: none; opacity: 1; }
}

/* Scrolling sheet */
.sheet {
  position: relative;
  z-index: 2;
  margin-top: 8px;
  padding: 8px var(--pad-x) 80px;
  background: linear-gradient(to bottom, rgba(5, 7, 10, 0) 0%, rgba(5, 7, 10, 0.72) 48px, rgba(5, 7, 10, 0.92) 140px);
}
.panel {
  max-width: 880px;
  margin: 0 auto 28px;
  padding: 32px 32px 8px;
  border-radius: var(--r-panel);
  background: var(--glass);
  border: 1px solid var(--hairline);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  box-shadow: var(--sh-panel);
}
.panel-head { padding-bottom: 18px; }
.panel-head h2 {
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
  margin-top: 4px;
}
.muted { color: var(--text-2); font-size: 15px; margin-top: 8px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  list-style: none;
  padding: 8px 0 28px;
  margin: 0;
  border-top: 1px solid var(--hairline);
}
.stats li {
  padding: 18px 12px 8px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stats strong {
  font-size: clamp(32px, 5vw, 48px);
  letter-spacing: -0.04em;
  color: var(--accent);
  font-weight: 650;
  line-height: 1;
}
.stats span { color: var(--text-2); font-size: 13px; }

.rules {
  list-style: none;
  padding: 0 0 24px;
  margin: 0;
  counter-reset: rule;
}
.rules li {
  counter-increment: rule;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--hairline);
  color: var(--text-body);
}
.rules li::before {
  content: counter(rule);
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 14px;
  padding-top: 1px;
}

.rows {
  list-style: none;
  padding: 0 0 16px;
  margin: 0;
}
.rows li {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 16px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid var(--hairline);
}
.rows h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.rows p { color: var(--text-body); font-size: 15px; margin-top: 4px; }
.tags { color: var(--text-3); }

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  width: fit-content;
  margin-top: 2px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-2);
}
.chip.buy { color: var(--accent); background: var(--accent-soft); }
.chip.sell { color: #8ecbff; background: rgba(90, 168, 255, 0.12); }
.chip.seek { color: #e8c36a; background: rgba(232, 160, 90, 0.12); }
.chip.acquire { color: #f5f5f7; background: rgba(255, 255, 255, 0.08); }
.chip.ok { color: var(--ok); background: rgba(48, 209, 88, 0.12); }
.chip.pending { color: var(--accent); background: var(--accent-soft); }
.chip.wait { color: var(--warn); background: rgba(255, 159, 10, 0.12); }
.chip.together { color: var(--accent); background: var(--accent-soft); }
.chip.agent { color: #c8f3ea; background: rgba(61, 217, 193, 0.10); }
.chip.human { color: var(--human); background: rgba(232, 160, 90, 0.12); }

.code {
  margin: 0 0 28px;
  padding: 18px 20px;
  border-radius: var(--r-thumb);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--hairline);
  color: var(--text-body);
  font-size: 13px;
  line-height: 1.5;
  overflow: auto;
}

.foot {
  max-width: 880px;
  margin: 8px auto 0;
  padding: 28px 8px 0;
  border-top: 1px solid var(--hairline);
  color: var(--text-2);
  font-size: 14px;
}
.foot p + p { margin-top: 8px; }

/* Node card */
.node-card {
  position: fixed;
  z-index: 22;
  top: 84px;
  right: 22px;
  width: min(320px, calc(100vw - 32px));
  padding: 20px 20px 16px;
  border-radius: var(--r-card);
  background: rgba(12, 14, 18, 0.9);
  border: 1px solid var(--hairline);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  box-shadow: var(--sh-panel);
}
.node-card[hidden] { display: none; }
.card-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-2);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.card-close:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.node-card .kicker {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 6px;
}
.node-card h3 { font-size: 20px; letter-spacing: -0.03em; padding-right: 28px; }
.node-card .sub { color: var(--text-2); font-size: 14px; margin-top: 6px; }
.node-card .status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-body);
}
.node-card .dot {
  width: 8px; height: 8px; border-radius: 50%; background: #3a5a56;
}
.node-card .dot.work { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.node-card .dot.you { background: var(--you); box-shadow: 0 0 8px var(--you); }
.node-card .card-link {
  display: inline-flex;
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy { animation: none; opacity: 1; transform: none; }
  .swatch.work { animation: none; }
}

@media (max-width: 900px) {
  .hud { flex-wrap: wrap; gap: 8px; }
  .brand-tag, .brand-sub { display: none; }
  .hud-actions { width: 100%; margin-left: 0; }
  .ribbon { margin-left: auto; }
  .me-btn span, .cx-btn span { display: none; }
  .hero { padding: 108px 16px 48px; }
  .hero-copy { padding: 22px 20px 18px; }
  .sheet { padding-left: 16px; padding-right: 16px; }
  .panel { padding: 24px 20px 4px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .rows li { grid-template-columns: 1fr; gap: 8px; }
  .hint { display: none; }
  .gesture { display: block; }
  .node-card { top: auto; bottom: 16px; right: 16px; left: 16px; width: auto; }
}

@media (max-width: 520px) {
  .hud-actions .btn { display: none; }
  .hero h1 { font-size: 30px; }
}
