/* ─── Reset & Base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #090909;
  --bg-surface:   #111111;
  --bg-raised:    #181818;
  --fg:           #f5f5f5;
  --fg-muted:     #8a8a8a;
  --fg-subtle:    #3a3a3a;
  --accent:       #22d3ee;
  --accent-dim:   rgba(34, 211, 238, 0.10);
  --accent-human: #a78bfa;
  --border:       rgba(255, 255, 255, 0.07);
  --radius:       8px;
  --radius-lg:    14px;
  --font:         system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:    ui-monospace, "SF Mono", "Fira Code", monospace;
  --max-w:        1080px;
  --pad:          clamp(1.25rem, 5vw, 2.5rem);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

.accent { color: var(--accent); }

.flash {
  max-width: var(--max-w);
  margin: 0.75rem auto 0;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--fg);
  background: var(--bg-surface);
}

.flash--notice { border-color: rgba(34, 211, 238, 0.4); }
.flash--alert { border-color: rgba(239, 68, 68, 0.4); }

/* ─── Layout helpers ─────────────────────────────────────────────────────── */
.nav-inner,
.section-inner,
.hero-inner,
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad); }

/* ─── Nav ────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(9, 9, 9, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--fg);
}

.nav-logo-image {
  width: 80px;
  height: 80px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.nav-links { display: flex; align-items: center; gap: 0.5rem; }

.nav-link {
  font-size: 0.875rem;
  color: var(--fg-muted);
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius);
  transition: color 0.15s;
}

.nav-link:hover { color: var(--fg); }

.nav-link--meta {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--accent);
}

.nav-link--meta svg { flex-shrink: 0; }

.nav-link--cta {
  color: var(--fg);
  background: var(--bg-raised);
  border: 1px solid var(--border);
}

.nav-link--cta:hover { border-color: rgba(255,255,255,0.15); }

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.625rem 1.375rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: opacity 0.15s, background 0.15s, border-color 0.15s;
  cursor: pointer;
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.btn--primary:hover { opacity: 0.88; }

.btn--ghost {
  background: transparent;
  color: var(--fg-muted);
  border-color: var(--border);
}

.btn--ghost:hover { color: var(--fg); border-color: rgba(255,255,255,0.15); }

.btn--secondary {
  background: var(--fg);
  color: #000;
  border-color: var(--fg);
}

.btn--secondary:hover { opacity: 0.85; }

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.hero { padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(3rem, 8vw, 6rem); }

.hero-eyebrow {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.hero-headline {
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--fg);
  margin-bottom: 1.5rem;
  max-width: 18ch;
}

.hero-headline-accent { color: var(--accent); }

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.175rem);
  color: var(--fg-muted);
  max-width: 52ch;
  line-height: 1.7;
  margin-bottom: 2.25rem;
}

.hero-actions { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }

.hero-about {
  display: block;
  font-size: 0.8125rem;
  color: var(--fg-muted);
  margin-top: -1.75rem;
  margin-bottom: 2.25rem;
  transition: color 0.15s;
}

.hero-about:hover { color: var(--fg); }
.hero-actions .btn { min-width: 13rem; justify-content: center; }

/* ─── Shared section styles ──────────────────────────────────────────────── */
.how, .why, .code-preview, .paths {
  padding: clamp(2rem, 4vw, 3rem) 0 clamp(3rem, 8vw, 5.5rem);
  border-top: 2px solid var(--border);
}

.paths { padding-bottom: clamp(2rem, 4vw, 3rem); }

.section-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.section-header .section-title { margin-bottom: 0; }

.section-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  transition: opacity 0.15s;
}

.section-link:hover { opacity: 0.75; }

.section-title {
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--fg);
  margin-bottom: 2.5rem;
}

/* ─── Toggle ─────────────────────────────────────────────────────────────── */
.toggle {
  display: inline-flex;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.toggle-tab {
  font-family: var(--font);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.375rem 1rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.toggle-tab:hover { color: var(--fg); }

.toggle-tab--active {
  background: var(--accent);
  color: #000;
}

.toggle-tab--active:hover { color: #000; }

.toggle--humans .toggle-tab--active {
  background: var(--fg);
}

.toggle-panel {
  display: none;
}

.toggle-panel--visible {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── How it works ───────────────────────────────────────────────────────── */

.step {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.step-heading { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; }
.step-body { font-size: 0.9375rem; color: var(--fg-muted); line-height: 1.6; }

/* ─── Why HumanEyes ──────────────────────────────────────────────────────── */
.why-grid { gap: 1.5rem; }

.why-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
}

.why-icon { font-size: 1.25rem; display: block; margin-bottom: 0.875rem; }
.why-heading { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; }
.why-body { font-size: 0.9375rem; color: var(--fg-muted); line-height: 1.6; }

/* ─── Code preview ───────────────────────────────────────────────────────── */
.code-block {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.code-block pre {
  padding: 1.75rem 2rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--fg-muted);
  white-space: pre;
}

.code-block code { font-family: inherit; color: inherit; }

/* ─── Two paths ──────────────────────────────────────────────────────────── */
.paths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
  gap: 1.5rem;
}

.path-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.path-card .btn { align-self: flex-start; }

.path-card--human { border-color: rgba(167, 139, 250, 0.18); }

.path-heading { font-size: 1.125rem; font-weight: 700; }
.path-body { font-size: 0.9375rem; color: var(--fg-muted); line-height: 1.65; flex: 1; }

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  border-top: 2px solid var(--border);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand { font-size: 0.875rem; font-weight: 600; color: var(--fg-muted); }

.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }

.footer-link { font-size: 0.8125rem; color: var(--fg-muted); transition: color 0.15s; }
.footer-link:hover { color: var(--fg); }

.footer-note { font-size: 0.8125rem; color: var(--fg-subtle); }

/* ─── Page layout (about, privacy, contact) ─────────────────────────────── */
.page { padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(3rem, 8vw, 5.5rem); }

.page-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad); }
.page-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.page-sub {
  font-size: 1rem;
  color: var(--fg-muted);
  margin-bottom: 2.5rem;
  max-width: 52ch;
}

.page-updated {
  font-size: 0.8125rem;
  color: var(--fg-subtle);
  margin-bottom: 2rem;
}

.page-body { max-width: 65ch; }

.page-body p {
  font-size: 0.9375rem;
  color: var(--fg-muted);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.page-body h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--fg);
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
}

.page-body a { color: var(--accent); }
.page-body a:hover { text-decoration: underline; }
.code-sample {
  margin: 0.75rem 0 1.5rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-surface);
  overflow-x: auto;
}
.code-sample code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--fg-muted);
  white-space: pre;
}
.form-actions { display: flex; flex-direction: column; gap: 0.75rem; }
.form-actions .page-meta { margin-top: 0; }

.page-meta { margin-top: 1rem; font-size: 0.875rem; color: var(--fg-muted); }
.page-meta a { color: var(--accent); }
.page-meta a:hover { text-decoration: underline; }

.role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.role-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--fg-muted);
  font-size: 0.875rem;
}

.role-option input { accent-color: var(--accent); }

/* ─── Contact form ──────────────────────────────────────────────────────── */
.contact-form { max-width: 480px; }

.form-field { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fg-muted);
  margin-bottom: 0.375rem;
}

.form-input {
  width: 100%;
  font-family: var(--font);
  font-size: 0.9375rem;
  padding: 0.625rem 0.875rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
  transition: border-color 0.15s;
}

.form-input::placeholder { color: var(--fg-subtle); }
.form-input:focus { outline: none; border-color: var(--accent); }

.form-textarea { resize: vertical; min-height: 120px; }

/* ─── Dashboards ─────────────────────────────────────────────────────────── */
.dashboard {
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 7vw, 5rem);
}

.dashboard-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.dashboard-header { margin-bottom: 1.75rem; }
.dashboard-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}
.dashboard-sub {
  color: var(--fg-muted);
  font-size: 1rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.metric-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.125rem;
}

.metric-label { font-size: 0.8125rem; color: var(--fg-muted); margin-bottom: 0.25rem; }
.metric-value { font-size: 1.25rem; font-weight: 600; }
.metric-note { font-size: 0.75rem; color: var(--fg-subtle); }

.panel-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-card,
.table-card,
.side-card,
.task-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.panel-title { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.25rem; }
.panel-sub { color: var(--fg-muted); font-size: 0.875rem; margin-bottom: 1rem; }

.dashboard-form .form-field:last-of-type { margin-bottom: 1rem; }

.panel-list { display: grid; gap: 0.75rem; margin-bottom: 1rem; }
.panel-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
}
.panel-item .label { color: var(--fg-muted); }
.panel-item .value { color: var(--fg); }
.panel-actions { display: flex; gap: 0.625rem; flex-wrap: wrap; }
.api-key-main { display: grid; gap: 0.25rem; }
.api-key-reveal {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: var(--radius);
  background: rgba(34, 211, 238, 0.08);
}
.api-key-reveal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.api-key-reveal-label { font-size: 0.75rem; color: var(--fg-muted); margin-bottom: 0.25rem; }
.api-key-code {
  display: block;
  font-size: 0.8125rem;
  color: var(--fg);
  word-break: break-all;
}
.api-key-copy { padding: 0.35rem 0.75rem; font-size: 0.75rem; }

.table-header { margin-bottom: 0.875rem; }
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.jobs-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.jobs-table th,
.jobs-table td { text-align: left; padding: 0.625rem 0.5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.jobs-table th { color: var(--fg-muted); font-weight: 500; }
.job-state {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
}
.empty-state { color: var(--fg-muted); font-size: 0.9375rem; }

/* ─── Human dashboard ────────────────────────────────────────────────────── */
.human-dashboard {
  padding: clamp(1.5rem, 4vw, 2.75rem) 0 clamp(2rem, 6vw, 4rem);
}

.human-dashboard-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--pad);
  display: block;
}

.human-main { display: flex; flex-direction: column; gap: 0.875rem; }
.human-top {
  width: min(100%, 1000px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.human-title { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; letter-spacing: -0.02em; }
.human-wallet-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--fg-muted);
  font-size: 0.875rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-surface);
  transition: color 0.15s, border-color 0.15s;
}
.human-wallet-link:hover {
  color: var(--fg);
  border-color: rgba(255, 255, 255, 0.16);
}
.human-ready { min-width: 140px; justify-content: center; font-size: 1rem; }
.human-ready--paused { opacity: 0.65; }

.task-card {
  width: min(100%, 1000px);
  margin: 0 auto;
  padding: 1rem;
  position: relative;
}
.task-card--overlay .task-image-wrap,
.task-card--overlay .task-question,
.task-card--overlay .task-actions {
  opacity: 0;
  pointer-events: none;
}
.task-card--overlay .task-image-wrap { border-color: transparent; }
.ready-overlay {
  position: absolute;
  inset: 1rem;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 9, 9, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  backdrop-filter: blur(2px);
}
.ready-overlay--hidden {
  opacity: 0;
  pointer-events: none;
}
.ready-overlay-content {
  width: min(560px, 92%);
  display: grid;
  gap: 1rem;
}
.ready-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.5rem;
}
.ready-stat {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
  padding: 0.5rem 0.625rem;
  background: rgba(9, 9, 9, 0.55);
  text-align: center;
}
.ready-stat--global {
  grid-column: 1 / -1;
}
.ready-stat .label {
  display: block;
  color: var(--fg-muted);
  font-size: 0.75rem;
  margin-bottom: 0.1rem;
}
.ready-stat strong { font-size: 0.9375rem; }
.task-image-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 0.875rem;
  background: #050505;
  height: clamp(360px, 58vh, 620px);
}

.task-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.task-image--empty { visibility: hidden; }

.task-question {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 600;
  margin-bottom: 0.875rem;
  line-height: 1.4;
}

.task-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.625rem;
}

.task-btn {
  font-family: var(--font);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #0f0f0f;
  color: var(--fg);
  padding: 0.875rem 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.task-btn:hover { border-color: rgba(255, 255, 255, 0.18); }
.task-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.task-btn--yes { border-color: rgba(34, 211, 238, 0.35); }
.task-btn--yes:hover { background: rgba(34, 211, 238, 0.12); }
.task-btn--no { border-color: rgba(255, 255, 255, 0.14); }
.task-btn--wrong { border-color: rgba(255, 255, 255, 0.14); }

.task-status {
  color: var(--fg-muted);
  font-size: 0.875rem;
  min-height: 1.5em;
}
.task-status--top { min-height: 0; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (min-width: 900px) {
  .hero-eyebrow { font-size: 0.875rem; margin-bottom: 1.5rem; }
  .hero-headline { font-size: 5rem; max-width: 20ch; margin-bottom: 1.75rem; }
  .hero-sub { font-size: 1.3125rem; max-width: 56ch; margin-bottom: 2.5rem; }

  .page { padding: 3.5rem 0 5.5rem; }
  .page-title { font-size: 3rem; margin-bottom: 0.75rem; }
  .page-sub { font-size: 1.1875rem; margin-bottom: 2.5rem; max-width: 56ch; }
  .contact-form { max-width: 720px; }
  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .form-label { font-size: 0.875rem; margin-bottom: 0.5rem; }
  .form-input { font-size: 1rem; padding: 0.75rem 1rem; }
  .form-field { margin-bottom: 1.5rem; }
  .role-option { padding: 0.75rem 1rem; font-size: 0.9375rem; }
  .form-actions { flex-direction: row; align-items: center; gap: 1.25rem; }
  .page-meta { font-size: 0.9375rem; margin-top: 1.25rem; }
}

@media (max-width: 600px) {
  .footer { padding: 2rem 0; }
}

@media (max-width: 960px) {
  .panel-grid { grid-template-columns: 1fr; }
  .task-actions { grid-template-columns: 1fr; }
  .human-top { align-items: flex-start; flex-direction: column; }
  .human-wallet-link {
    width: 100%;
    justify-content: center;
    padding: 0.55rem 0.75rem;
  }
  .ready-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-image { height: clamp(300px, 50vh, 520px); }
  .jobs-table { min-width: 760px; }
  .jobs-table th,
  .jobs-table td { padding: 0.5rem 0.45rem; font-size: 0.8125rem; }
}

@media (min-width: 961px) {
  .human-top {
    justify-content: flex-start;
    gap: 0.75rem;
  }
}
