/* Pinchtab — OpenClaw-inspired dark theme, yellow accent */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --yellow: #fbbf24;
  --yellow-light: #fde68a;
  --yellow-dark: #d97706;
  --bg: #0f1117;
  --bg-card: #1a1d27;
  --bg-card-hover: #222633;
  --bg-code: #141720;
  --border-color: rgba(251, 191, 36, 0.15);
  --border-subtle: rgba(255, 255, 255, 0.06);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --radius: 16px;
  --radius-sm: 10px;
  --mono: 'JetBrains Mono', monospace;
  --heading: 'Space Grotesk', sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  --max-w: 1080px;
  --glow: 0 0 40px rgba(251, 191, 36, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--yellow); text-decoration: none; }
a:hover { color: var(--yellow-light); }

code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: rgba(251, 191, 36, 0.08);
  padding: 2px 7px;
  border-radius: 5px;
  color: var(--yellow-light);
}

/* ═══════════ NAV ═══════════ */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}
.logo img { height: 32px; border-radius: 6px; }
.logo span {
  font-family: var(--heading);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}
.nav-links {
  margin-left: auto;
  display: flex;
  gap: 8px;
}
.nav-links a {
  font-family: var(--body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 8px;
  transition: all 0.2s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-links a.cta {
  background: var(--yellow);
  color: var(--bg);
  font-weight: 600;
}
.nav-links a.cta:hover { background: var(--yellow-light); }

/* ═══════════ HERO ═══════════ */
.hero {
  text-align: center;
  padding: 80px 24px 60px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(251,191,36,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero .mascot {
  width: 160px;
  height: 160px;
  margin: 0 auto 24px;
  position: relative;
  z-index: 1;
}
.hero .mascot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 30px rgba(251,191,36,0.2));
}
.hero h1 {
  font-family: var(--heading);
  font-size: clamp(2.8rem, 6vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}
.hero h1 .accent {
  background: linear-gradient(135deg, var(--yellow), var(--yellow-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero .subtitle {
  font-family: var(--heading);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 20px;
}
.hero .tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.badges {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 36px;
}
.badge {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-subtle);
  background: rgba(255,255,255,0.03);
  color: var(--text-muted);
}
.badge.yellow {
  border-color: rgba(251,191,36,0.3);
  background: rgba(251,191,36,0.08);
  color: var(--yellow);
}
.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  font-family: var(--heading);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--yellow);
  color: var(--bg);
}
.btn-primary:hover { background: var(--yellow-light); color: var(--bg); transform: translateY(-1px); }
.btn-secondary {
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border: 1px solid var(--border-subtle);
}
.btn-secondary:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.12); }

/* ═══════════ SECTIONS ═══════════ */
section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 72px 24px;
}
.section-label {
  font-family: var(--heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::before {
  content: '›';
  font-size: 1.2rem;
}
section h2 {
  font-family: var(--heading);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
section .desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin-bottom: 32px;
  line-height: 1.7;
}

/* ═══════════ CODE BLOCK ═══════════ */
.code-window {
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 24px 0;
  box-shadow: var(--glow);
}
.code-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}
.code-dots {
  display: flex;
  gap: 6px;
}
.code-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.code-dots .red { background: #ef4444; }
.code-dots .yellow { background: #fbbf24; }
.code-dots .green { background: #22c55e; }
.code-body {
  padding: 20px 24px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.8;
  overflow-x: auto;
  color: var(--text-muted);
}
.code-body .comment { color: var(--text-dim); }
.code-body .cmd { color: var(--yellow); }
.code-body .string { color: #86efac; }
.code-body .flag { color: #93c5fd; }

/* ═══════════ FEATURE GRID ═══════════ */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all 0.2s;
}
.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color);
}
.feature-card .icon {
  font-size: 1.6rem;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(251,191,36,0.06);
  border-radius: 10px;
}
.feature-card h3 {
  font-family: var(--heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ═══════════ COMPARISON TABLE ═══════════ */
.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
}
.comparison {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.comparison th {
  font-family: var(--heading);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  padding: 14px 20px;
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
}
.comparison td {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
}
.comparison td:first-child {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text);
  white-space: nowrap;
}
.comparison tr:last-child td { border-bottom: none; }
.comparison .win {
  color: var(--yellow);
  font-weight: 600;
}

/* ═══════════ TOKEN CHART ═══════════ */
.token-chart {
  display: flex;
  gap: 20px;
  align-items: flex-end;
  height: 220px;
  padding: 20px 0;
}
.token-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  height: 100%;
  justify-content: flex-end;
}
.token-bar .count {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}
.token-bar .bar {
  width: 100%;
  max-width: 100px;
  border-radius: 8px 8px 4px 4px;
  transition: height 0.3s;
}
.token-bar .bar.dim { background: rgba(255,255,255,0.08); }
.token-bar .bar.highlight {
  background: linear-gradient(180deg, var(--yellow), var(--yellow-dark));
  box-shadow: 0 0 20px rgba(251,191,36,0.15);
}
.token-bar .label {
  font-family: var(--mono);
  font-size: 0.65rem;
  text-align: center;
  color: var(--text-dim);
  line-height: 1.4;
}

/* ═══════════ ARCHITECTURE ═══════════ */
.arch-box {
  background: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 36px;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--text-muted);
  text-align: center;
  white-space: pre;
  overflow-x: auto;
  box-shadow: var(--glow);
}
.arch-box .highlight { color: var(--yellow); }

/* ═══════════ API TABLE ═══════════ */
.api-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.api-table th {
  font-family: var(--heading);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  padding: 12px 20px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-subtle);
}
.api-table td {
  padding: 11px 20px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted);
}
.api-table tr:last-child td { border-bottom: none; }
.method {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 5px;
}
.method.get { background: rgba(34,197,94,0.1); color: #4ade80; }
.method.post { background: rgba(251,191,36,0.1); color: var(--yellow); }

/* ═══════════ SECURITY WARNING ═══════════ */
.security-warning {
  display: flex;
  gap: 20px;
  background: rgba(251, 191, 36, 0.04);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: var(--radius);
  padding: 28px;
  margin-top: 8px;
}
.warning-icon { font-size: 2rem; flex-shrink: 0; }
.warning-content p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.warning-content ul {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.warning-content li {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding-left: 20px;
  position: relative;
}
.warning-content li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--yellow);
}

/* ═══════════ INSTALL ═══════════ */
.install-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.install-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 24px;
}
.install-card h3 {
  font-family: var(--heading);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 14px;
}

/* ═══════════ CONTRIBUTORS ═══════════ */
.contributors-row {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}
.contributor-group h3 {
  font-family: var(--heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.contributor-cards {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.contributor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.2s;
  min-width: 140px;
}
.contributor:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-color);
}
.contributor img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-subtle);
}
.contributor .name {
  font-family: var(--heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}
.contributor .tagline {
  font-family: var(--body);
  font-size: 0.72rem;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.4;
}
.contributor.agent {
  cursor: default;
}
.agent-avatar-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  border: 2px dashed var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

/* ═══════════ FOOTER ═══════════ */
footer {
  border-top: 1px solid var(--border-subtle);
  padding: 48px 24px;
  text-align: center;
}
footer .links {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 20px;
}
footer .links a {
  font-size: 0.85rem;
  color: var(--text-muted);
}
footer .links a:hover { color: var(--yellow); }
footer .copy {
  font-size: 0.78rem;
  color: var(--text-dim);
}
footer .copy a { color: var(--text-dim); }
footer .copy a:hover { color: var(--yellow); }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 768px) {
  .features { grid-template-columns: 1fr; }
  .install-grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 16px 40px; }
  section { padding: 48px 16px; }
  .token-chart { height: 180px; gap: 12px; }
  .nav-links a { padding: 6px 10px; font-size: 0.8rem; }
}
@media (max-width: 480px) {
  .nav-links .hide-mobile { display: none; }
}
