/*
Theme Name: O-Matic Research Lab
Theme URI: https://o-matic.io
Author: James "Jimmy" Walker
Author URI: https://o-matic.io
Description: Custom theme for O-Matic AI Research Lab. Clean, minimal, left-sidebar navigation.
Version: 1.0
License: Proprietary
Text Domain: omatic
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --gold: #E0B45A;
  --teal: #00B5AD;
  --black: #1A1A1A;
  --white: #FFFFFF;
  --gray-bg: #F5F5F5;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --font-heading: 'Montserrat', 'Inter', sans-serif;
  --font-body: 'Nunito', 'Inter', sans-serif;
  --sidebar-w: 288px;
}

html { scroll-behavior: smooth; }

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ===== LAYOUT ===== */
.site-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--gray-200);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: transform 0.2s ease;
}

.sidebar-brand {
  padding: 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-brand .logo-text h1 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.sidebar-brand .logo-text h1 .gold { color: var(--gold); }
.sidebar-brand .logo-text h1 .ai { color: var(--teal); font-size: 14px; }

.sidebar-brand .logo-text .subtitle {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gray-400);
  font-weight: 600;
}

.sidebar-nav {
  flex: 1;
  padding: 24px 0;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  border-left: 4px solid transparent;
  transition: all 0.15s ease;
}

.sidebar-nav a:hover {
  border-left-color: var(--gold);
  background: rgba(224, 180, 90, 0.05);
}

.sidebar-nav a.active {
  border-left-color: var(--teal);
  background: rgba(0, 181, 173, 0.08);
  color: var(--teal);
}

.sidebar-nav a svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-mission {
  padding: 32px;
  border-top: 1px solid var(--gray-200);
}

.sidebar-mission .label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gray-400);
  margin-bottom: 12px;
}

.sidebar-mission .quote {
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.6;
  font-style: italic;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
}

.page-container {
  padding: 64px;
  max-width: 960px;
}

/* ===== MOBILE NAV ===== */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 50;
  background: var(--white);
  border: none;
  padding: 8px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  cursor: pointer;
}

.mobile-toggle svg { width: 20px; height: 20px; }

@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .page-container { padding: 24px; padding-top: 64px; }
}

/* ===== TYPOGRAPHY ===== */
.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-weight: 700;
  margin-bottom: 16px;
}

.eyebrow--teal { color: var(--teal); }
.eyebrow--gold { color: var(--gold); }

.page-title {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 16px;
  line-height: 1.1;
}

.page-subtitle {
  font-size: 20px;
  color: var(--gray-500);
  margin-bottom: 16px;
}

.divider {
  width: 64px;
  height: 4px;
  margin-bottom: 48px;
}

.divider--teal { background: var(--teal); }
.divider--gold { background: var(--gold); }

.section-title {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 16px;
}

/* ===== CARDS ===== */
.card {
  background: var(--white);
  padding: 40px;
  border-left: 4px solid var(--gray-200);
}

.card--teal { border-left-color: var(--teal); }
.card--gold { border-left-color: var(--gold); }
.card--black { border-left-color: var(--black); }
.card--gray { border-left-color: var(--gray-200); }

.card p { color: var(--gray-700); margin-bottom: 16px; }
.card p:last-child { margin-bottom: 0; }

/* ===== AGENT / SKILL CARDS ===== */
.agent-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.agent-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.agent-icon--teal { background: rgba(0, 181, 173, 0.08); color: var(--teal); }
.agent-icon--gold { background: rgba(224, 180, 90, 0.08); color: var(--gold); }
.agent-icon--black { background: rgba(26, 26, 26, 0.05); color: var(--black); }
.agent-icon--gray { background: var(--gray-100); color: var(--gray-400); }

.agent-name {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
}

.agent-role {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 700;
}

.agent-role--teal { color: var(--teal); }
.agent-role--gold { color: var(--gold); }
.agent-role--black { color: var(--gray-500); }

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

@media (max-width: 768px) {
  .detail-grid { grid-template-columns: 1fr; }
}

.detail-box {
  padding: 16px;
  border-radius: 6px;
}

.detail-box--teal { background: rgba(0, 181, 173, 0.05); }
.detail-box--gold { background: rgba(224, 180, 90, 0.05); }
.detail-box--gray { background: var(--gray-50); }

.detail-box .label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.detail-box .label--teal { color: var(--teal); }
.detail-box .label--gold { color: var(--gold); }
.detail-box .label--gray { color: var(--gray-500); }

.detail-box ul { padding: 0; }

.detail-box li {
  font-size: 14px;
  color: var(--gray-600);
  padding: 2px 0;
}

.detail-box li::before {
  content: "• ";
  margin-right: 4px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn--teal { background: var(--teal); color: var(--white); }
.btn--teal:hover { background: #009990; }
.btn--gold { background: var(--gold); color: var(--black); }
.btn--gold:hover { background: #d0a44a; }

.btn svg { width: 14px; height: 14px; }

/* ===== HERO ===== */
.hero {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

.hero-content { flex: 1; }

.hero-title {
  font-family: var(--font-heading);
  font-size: 60px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero-sub {
  font-size: 20px;
  color: var(--gray-500);
  margin-bottom: 24px;
  max-width: 640px;
}

.hero-mission {
  border-left: 4px solid var(--gold);
  padding-left: 20px;
  margin-bottom: 32px;
}

.hero-mission p {
  font-size: 18px;
  color: var(--black);
  font-weight: 500;
  font-style: italic;
}

.hero-robot {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .hero { flex-direction: column; }
  .hero-title { font-size: 40px; }
  .hero-robot { display: none; }
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.gold-bar {
  width: 96px;
  height: 4px;
  background: var(--gold);
  margin-bottom: 32px;
}

/* ===== STUDY GRID ===== */
.study-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .study-grid { grid-template-columns: 1fr; }
}

.study-card {
  padding: 20px;
  border-radius: 4px;
  border-top: 3px solid;
}

.study-card h3 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 8px;
}

.study-card p { font-size: 14px; color: var(--gray-600); }

/* ===== TEAM PREVIEW ===== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 768px) {
  .team-grid { grid-template-columns: 1fr; }
}

.team-card {
  background: var(--white);
  padding: 24px;
  border-left: 4px solid;
  transition: box-shadow 0.15s ease;
  cursor: pointer;
}

.team-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

.team-card .role {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 700;
  margin-bottom: 8px;
}

.team-card h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 12px;
}

.team-card p { font-size: 14px; color: var(--gray-600); }

.team-card .learn-more {
  margin-top: 16px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== STATS ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

.stat-card {
  background: var(--white);
  padding: 20px;
  text-align: center;
}

.stat-card .number {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 700;
  color: var(--teal);
}

.stat-card .label {
  font-size: 11px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

/* ===== PUBLICATION CARDS ===== */
.pub-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .pub-stats { grid-template-columns: 1fr; }
}

.pub-stat {
  background: rgba(0, 181, 173, 0.05);
  padding: 16px;
  border-radius: 6px;
  text-align: center;
}

.pub-stat .number {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--teal);
}

.pub-stat .title {
  font-size: 11px;
  font-weight: 700;
  color: var(--black);
  margin-top: 4px;
}

.pub-stat .sub {
  font-size: 10px;
  color: var(--gray-500);
}

.findings-box {
  background: var(--gray-50);
  padding: 20px;
  border-radius: 6px;
  margin-bottom: 24px;
}

.findings-box .label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray-500);
  margin-bottom: 12px;
}

.findings-box p {
  font-size: 14px;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.findings-box p:last-child { margin-bottom: 0; }

.findings-box strong { color: var(--teal); font-weight: 700; }

.pub-tag {
  display: inline-block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  margin-right: 8px;
}

.pub-tag--new { background: var(--teal); color: var(--white); }
.pub-tag--new-gold { background: var(--gold); color: var(--white); }

/* Token economics grid */
.token-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

@media (max-width: 768px) {
  .token-grid { grid-template-columns: 1fr; }
}

/* Upcoming publications */
.upcoming-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
  border-left: 4px solid var(--gray-200);
  background: var(--gray-50);
  margin-bottom: 16px;
}

.upcoming-icon {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gray-500);
}

.upcoming-item h3 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--black);
}

.upcoming-item p { font-size: 14px; color: var(--gray-500); }

/* ===== SECURITY PAGE ===== */
.governance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--gray-50);
  border-radius: 6px;
  margin-bottom: 12px;
}

.governance-row .label {
  font-size: 14px;
  font-weight: 500;
  color: var(--black);
}

.governance-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 999px;
}

.governance-badge--active {
  background: rgba(0, 181, 173, 0.1);
  color: var(--teal);
}

.governance-badge--blocked {
  background: rgba(239, 68, 68, 0.1);
  color: #DC2626;
}

.rules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .rules-grid { grid-template-columns: 1fr; }
}

.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: 8px;
}

.rule-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.rule-dot--teal { background: var(--teal); }
.rule-dot--gold { background: var(--gold); }

/* Philosophy block */
.philosophy {
  background: var(--black);
  padding: 40px;
  border-radius: 8px;
}

.philosophy h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
}

.philosophy p { color: var(--gray-400); margin-bottom: 16px; }

.philosophy .callout {
  border-left: 4px solid var(--gold);
  padding-left: 24px;
  margin-top: 24px;
}

.philosophy .callout p {
  color: var(--gold);
  font-size: 18px;
  font-style: italic;
  font-weight: 500;
}

/* ===== CLOSED FACTORY PAGE ===== */
.factory-flow {
  background: var(--black);
  padding: 32px;
  border-radius: 8px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 14px;
  margin-bottom: 48px;
}

.factory-flow p { margin-bottom: 4px; }
.factory-flow .gold { color: var(--gold); }
.factory-flow .teal { color: var(--teal); }
.factory-flow .gray { color: var(--gray-500); }
.factory-flow .white { color: var(--white); }

.upgrade-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .upgrade-grid { grid-template-columns: 1fr; }
}

.upgrade-card {
  background: var(--white);
  padding: 24px;
  border-left: 4px solid var(--teal);
}

.upgrade-card h3 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.upgrade-card h3 svg { color: var(--teal); width: 18px; height: 18px; }
.upgrade-card p { font-size: 14px; color: var(--gray-600); }

/* ===== FOOTER ===== */
.site-footer {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--gray-200);
}

.site-footer p {
  font-size: 12px;
  color: var(--gray-400);
}

.site-footer .teal { color: var(--teal); }

/* ===== SPACING UTILITIES ===== */
.space-y-12 > * + * { margin-top: 48px; }
.space-y-16 > * + * { margin-top: 64px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mt-6 { margin-top: 24px; }
