/* ═══════════════════════════════════════════
   INFINITE Protocol — Shared Design System
   Import this in every page:
   <link rel="stylesheet" href="/site/shared.css">
   ═══════════════════════════════════════════ */

/* ─── Reset ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ─── Tokens ─── */
:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --surface-2: #1a1a1a;
  --surface-3: #141414;
  --border: #222222;
  --border-light: #333333;
  --text: #f0efe9;
  --text-dim: #888880;
  --text-muted: #555550;
  --accent: #c8ff00;
  --accent-dim: #a0cc00;
  --accent-glow: rgba(200, 255, 0, 0.08);
  --green: #28c840;
  --red: #ff5f57;
  --blue: #00d4ff;
  --warm: #ff6b35;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Sora', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* ─── Base ─── */
html {
  scroll-behavior: smooth;
  background: var(--bg);
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

::selection { background: var(--accent); color: var(--bg); }

/* ─── Typography ─── */
.heading-xl {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 100px);
  line-height: 0.95;
  letter-spacing: -2px;
}

.heading-lg {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.1;
}

.heading-md {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
}

.heading-sm {
  font-family: var(--font-display);
  font-size: 20px;
}

.label-sm {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.mono {
  font-family: var(--font-mono);
}

.accent { color: var(--accent); }
.dim { color: var(--text-dim); }
.muted { color: var(--text-muted); }

/* ─── Nav ─── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--accent);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo .infinity {
  font-size: 24px;
  line-height: 1;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active { color: var(--accent); }

.nav-cta {
  font-family: var(--font-mono) !important;
  font-size: 11px !important;
  letter-spacing: 2px !important;
  padding: 10px 24px !important;
  background: var(--accent) !important;
  color: var(--bg) !important;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}

.nav-cta:hover {
  background: #fff !important;
  transform: translateY(-1px);
}

/* ─── Buttons ─── */
.btn-primary {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 18px 40px;
  background: var(--accent);
  color: var(--bg);
  border: 1px solid var(--accent);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  background: #fff;
  border-color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(200, 255, 0, 0.2);
}

.btn-secondary {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 18px 40px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-light);
  cursor: pointer;
  font-weight: 400;
  transition: all 0.3s;
  text-decoration: none;
  display: inline-block;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-sm {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 14px 20px;
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-sm:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-sm.primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  font-weight: 600;
}

.btn-sm.primary:hover { background: #fff; }
.btn-sm.danger:hover { border-color: var(--red); color: var(--red); }

/* ─── Cards ─── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 32px;
  transition: border-color 0.3s;
}

.card:hover { border-color: var(--border-light); }
.card.interactive:hover { border-color: var(--accent); background: var(--surface-2); }

/* ─── Section Helpers ─── */
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent);
}

/* ─── Stats Grid ─── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 24px;
  transition: border-color 0.3s;
}

.stat-card:hover { border-color: var(--border-light); }

.stat-card .stat-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.stat-card .stat-value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.stat-card .stat-value.accent { color: var(--accent); }
.stat-card .stat-value.green { color: var(--green); }

.stat-card .stat-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ─── Tools Grid ─── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 28px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.tool-card:hover { border-color: var(--accent); background: var(--surface-2); }

.tool-card .tool-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.tool-card .tool-icon { font-size: 24px; }

.tool-card .tool-status {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1px;
  padding: 3px 8px;
  border: 1px solid var(--green);
  color: var(--green);
}

.tool-card .tool-status.coming { border-color: var(--text-muted); color: var(--text-muted); }

.tool-card .tool-name {
  font-family: var(--font-display);
  font-size: 20px;
  margin-bottom: 6px;
}

.tool-card .tool-desc {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 300;
  line-height: 1.6;
  flex: 1;
}

.tool-card .tool-launch {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  margin-top: 16px;
  letter-spacing: 1px;
}

/* ─── Models List ─── */
.models-list { display: flex; flex-direction: column; gap: 2px; }

.model-row {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 1fr 120px 100px 80px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  transition: border-color 0.2s;
}

.model-row:hover { border-color: var(--border-light); }
.model-name { color: var(--text); font-weight: 500; }
.model-provider { color: var(--text-muted); }
.model-tier { color: var(--text-dim); }
.model-status { text-align: right; }

.model-status .live {
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.model-status .live::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ─── Code Block ─── */
.code-block {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 24px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-dim);
}

.code-block .comment { color: var(--text-muted); }
.code-block .string { color: var(--accent); }
.code-block .key { color: #ff9f43; }

/* ─── Footer ─── */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.footer-links { display: flex; gap: 24px; }

.footer-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 1px;
  transition: color 0.3s;
}

.footer-links a:hover { color: var(--accent); }

/* ─── Animations ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .nav { padding: 16px 20px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .tools-grid { grid-template-columns: 1fr; }
  .model-row { grid-template-columns: 1fr 1fr; gap: 4px; }
  .footer { flex-direction: column; gap: 20px; text-align: center; }
}
