/* ProctorNode landing page. Obsidian design system (see obsidian-tokens.css):
   semantic tokens only, light default, dark via <html data-theme="dark">.
   Plain CSS, no inline styles anywhere, so the console CSP holds. */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; line-height: 1.55; min-height: 100vh; }
h1, h2, h3, p { margin: 0; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
svg.i { width: 20px; height: 20px; flex: none; }
.muted { color: var(--color-muted); }
.mono { font-family: var(--font-mono); }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
section { scroll-margin-top: 80px; }

/* --- Buttons ------------------------------------------------------------- */
.btn, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 12px; font: 600 14px/1 var(--font-sans); padding: 12px 18px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: filter 150ms, background-color 150ms, border-color 150ms;
}
.btn { color: #fff; border: 0; background: var(--gradient-accent); box-shadow: var(--shadow-glow-accent); }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn-ghost { color: var(--color-ink-2); background: transparent; border: 1px solid var(--color-line-strong); }
.btn-ghost:hover { background: var(--color-raised); color: var(--color-ink); text-decoration: none; }
.btn-sm { padding: 8px 12px; font-size: 13px; border-radius: 10px; }
.btn svg, .btn-ghost svg { width: 16px; height: 16px; }

/* --- Top bar ------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--color-bg) 78%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-line);
}
.topbar .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--color-ink); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; display: block; }
.nav { display: flex; gap: 22px; margin-left: 24px; }
.nav a { color: var(--color-ink-2); font-weight: 500; font-size: 14px; }
.nav a:hover { color: var(--color-ink); text-decoration: none; }
.topbar .spacer { flex: 1; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--color-line); background: transparent; color: var(--color-ink-2); cursor: pointer;
}
.icon-btn:hover { background: var(--color-raised); color: var(--color-ink); }
.icon-btn svg { width: 18px; height: 18px; }
@media (max-width: 760px) {
  .nav { display: none; }
  .topbar .login-text { display: none; }
}

/* --- Hero ---------------------------------------------------------------- */
.hero { padding: 72px 0 40px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--color-accent-soft); color: var(--color-accent); font-size: 13px; font-weight: 600;
  margin-bottom: 20px;
}
.eyebrow svg { width: 15px; height: 15px; }
.hero h1 {
  font-size: clamp(34px, 6vw, 60px); line-height: 1.06; letter-spacing: -0.035em; font-weight: 800;
  max-width: 860px; margin: 0 auto;
}
.hero h1 .grad { background: var(--gradient-accent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: clamp(16px, 2vw, 19px); color: var(--color-ink-2); max-width: 680px; margin: 20px auto 0; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 32px; }
.platforms { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-top: 28px; color: var(--color-muted); font-size: 13px; }
.platforms span { display: inline-flex; align-items: center; gap: 6px; }
.platforms svg { width: 16px; height: 16px; }

/* --- Product preview (static mock of the console) ------------------------ */
.preview { padding: 24px 0 72px; }
.frame {
  border: 1px solid var(--color-line); border-radius: 20px; background: var(--color-surface);
  box-shadow: var(--shadow-float), var(--shadow-glow-accent); backdrop-filter: blur(var(--glass-blur));
  overflow: hidden;
}
.frame-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--color-line); background: var(--color-surface-2); }
.frame-bar .dots { display: flex; gap: 6px; }
.frame-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--color-line-strong); display: block; }
.frame-bar .addr { flex: 1; text-align: center; font: 12px var(--font-mono); color: var(--color-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frame-body { padding: 20px; display: grid; gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { border: 1px solid var(--color-line); border-radius: 14px; padding: 14px 16px; background: var(--color-surface); }
.kpi .label { font-size: 12px; color: var(--color-muted); font-weight: 500; }
.kpi .value { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi.ok .value { color: var(--color-ok); }
.kpi.warn .value { color: var(--color-warn); }
.kpi.bad .value { color: var(--color-bad); }
.pending-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px;
  border: 1px dashed color-mix(in srgb, var(--color-accent) 45%, var(--color-line)); background: var(--color-accent-soft);
  font-size: 13px;
}
.pending-row strong { color: var(--color-ink); }
.pending-row .grow { flex: 1; min-width: 160px; color: var(--color-ink-2); }
.room-head { display: flex; align-items: baseline; justify-content: space-between; font-size: 13px; }
.room-head strong { font-size: 14px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile { border: 1px solid var(--color-line); border-radius: 14px; padding: 12px; background: var(--color-surface); display: grid; gap: 10px; }
.tile .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tile .name { font-weight: 600; font-size: 13px; white-space: nowrap; }
.tile .screen { aspect-ratio: 16 / 9; border-radius: 8px; background: var(--color-bg-2); border: 1px solid var(--color-line); display: grid; place-items: center; color: var(--color-muted); }
.tile .screen svg { width: 22px; height: 22px; opacity: .7; }
.tile .screen.locked { background: var(--color-accent-soft); color: var(--color-accent); }
.meter { display: grid; gap: 4px; font-size: 11px; color: var(--color-muted); }
.meter .row { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.meter .track { height: 6px; border-radius: 999px; background: var(--color-raised); overflow: hidden; }
.meter .fill { height: 100%; border-radius: 999px; background: var(--gradient-accent); }
.meter .fill.hot { background: var(--color-warn-fill); }
.w12 { width: 12%; } .w24 { width: 24%; } .w38 { width: 38%; } .w93 { width: 93%; }
@media (max-width: 860px) {
  .kpis, .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --- Badges -------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600; white-space: nowrap; border: 1px solid transparent;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--color-ok-soft); color: var(--color-ok); box-shadow: var(--shadow-glow-ok); }
.badge.warn { background: var(--color-warn-soft); color: var(--color-warn); box-shadow: var(--shadow-glow-warn); }
.badge.bad { background: var(--color-bad-soft); color: var(--color-bad); box-shadow: var(--shadow-glow-bad); }
.badge.idle { background: var(--color-raised); color: var(--color-muted); }
.badge.accent { background: var(--color-accent-soft); color: var(--color-accent); }

/* --- Sections ------------------------------------------------------------ */
.section { padding: 72px 0; border-top: 1px solid var(--color-line); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--color-accent); }
.section-head h2 { font-size: clamp(26px, 4vw, 38px); letter-spacing: -0.025em; line-height: 1.15; margin-top: 10px; }
.section-head p { color: var(--color-ink-2); margin-top: 12px; font-size: 16px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 920px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cards { grid-template-columns: 1fr; } }
.card {
  border: 1px solid var(--color-line); border-radius: 18px; background: var(--color-surface); padding: 22px;
  box-shadow: var(--shadow-card); backdrop-filter: blur(var(--glass-blur));
  transition: border-color 150ms;
}
.card:hover { border-color: color-mix(in srgb, var(--color-accent) 30%, var(--color-line)); }
.card h3 { font-size: 16px; margin-top: 14px; letter-spacing: -0.01em; }
.card p { color: var(--color-ink-2); margin-top: 6px; font-size: 14px; }
.icon-tile { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--color-accent-soft); color: var(--color-accent); }
.icon-tile svg { width: 22px; height: 22px; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; }
.step .num {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 700;
  color: #fff; background: var(--gradient-accent); box-shadow: var(--shadow-glow-accent);
}

/* --- Setup --------------------------------------------------------------- */
.setup { display: grid; gap: 16px; }
.setup .card { display: grid; gap: 12px; }
.setup .card-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.setup .card-top h3 { margin: 0; }
.setup .card-top .grow { flex: 1; }
.cmd { position: relative; }
.cmd pre {
  margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--color-bg-2); border: 1px solid var(--color-line);
  font: 12.5px/1.6 var(--font-mono); color: var(--color-ink); white-space: pre-wrap; word-break: break-all;
  user-select: all;
}
.copy { position: absolute; top: 8px; right: 8px; }
.copy.copied { border-color: var(--color-ok); color: var(--color-ok); }
.cmd pre.has-copy { padding-right: 92px; }
.note { font-size: 13px; color: var(--color-muted); }
.alert-box {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  background: var(--color-warn-soft); color: var(--color-warn); font-size: 13px;
}
.alert-box svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.approve-note { display: flex; gap: 10px; align-items: center; justify-content: center; color: var(--color-ink-2); font-size: 14px; margin-top: 8px; text-align: center; }
.approve-note svg { width: 18px; height: 18px; color: var(--color-ok); }

/* --- Footer -------------------------------------------------------------- */
footer { border-top: 1px solid var(--color-line); padding: 32px 0 48px; color: var(--color-muted); font-size: 13px; }
footer .wrap { display: grid; gap: 10px; }
footer .row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
footer .fp { font: 11.5px var(--font-mono); word-break: break-all; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  .topbar, .copy, [data-theme-toggle] { display: none !important; }
}
