/* ═══ IMBILA.AI DESIGN TOKENS v3.0 ═══ */
/* brand.imbila.ai — single source of truth */

:root {
  /* Font — DM Sans. No exceptions. */
  --font: 'DM Sans', system-ui, -apple-system, sans-serif;

  /* Honey Gold — brand accent */
  --honey:      #EDAF42;
  --honey-light:#F5C96E;
  --honey-dark: #C8922F;
  --honey-deep: #A67720;
  --honey-wash: #FAE0A5;
  --honey-10:   rgba(237,175,66,0.10);
  --honey-15:   rgba(237,175,66,0.15);

  /* Blacks */
  --black:      #0A0A0A;
  --black-rich: #111111;
  --black-soft: #1A1A1A;

  /* Neutral Scale */
  --grey-900: #1F1E1E;
  --grey-800: #2A2A2A;
  --grey-700: #3D3D3D;
  --grey-600: #555555;
  --grey-500: #777777;
  --grey-400: #999999;
  --grey-300: #BBBBBB;
  --grey-200: #DDDDDD;
  --grey-100: #EEEEEE;
  --grey-50:  #F5F5F5;
  --white:    #FAFAFA;

  /* Semantic */
  --success: #3A9E6B;
  --warning: #E8A838;
  --error:   #D94F4F;
  --info:    #4A90B8;

  /* Radii */
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-pill: 100px;
}

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

body {
  font-family: var(--font);
  background: var(--black);
  color: var(--grey-300);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--honey); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--honey-light); }

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

/* ── Nav ──────────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--grey-800);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  height: 56px;
  gap: 32px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.nav-logo { flex-shrink: 0; }
.nav-wordmark {
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
}
.nav-links {
  display: flex;
  gap: 24px;
  flex: 1;
}
.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--grey-400);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--white); }
.nav-version {
  font-size: 11px;
  font-weight: 500;
  color: var(--honey-dark);
  border: 1px solid var(--honey-dark);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

/* ── Page wrapper ─────────────────────────────────────────── */
.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 60px 40px;
}
.page-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 40px;
}

/* ── Section labels ───────────────────────────────────────── */
.section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--honey-dark);
  margin-bottom: 12px;
}

/* ── Hero (landing page) ──────────────────────────────────── */
.hero {
  text-align: center;
  padding: 80px 0 60px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 20px;
}
.hero .subtitle {
  font-size: 18px;
  font-weight: 400;
  color: var(--grey-400);
  max-width: 600px;
  margin: 0 auto 32px;
  line-height: 1.6;
}
.hero-pills {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pill {
  font-size: 12px;
  font-weight: 500;
  padding: 6px 16px;
  border: 1px solid var(--grey-700);
  border-radius: var(--radius-pill);
  color: var(--grey-300);
  background: transparent;
}

/* ── Cards grid ───────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.card {
  background: var(--grey-900);
  border: 1px solid var(--grey-800);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--grey-700);
}
.card-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--honey-10);
  border-radius: var(--radius-md);
  font-size: 18px;
  color: var(--honey);
}
.card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
}
.card p {
  font-size: 14px;
  color: var(--grey-400);
  line-height: 1.6;
}
.card-link {
  margin-top: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--honey);
}
.card-link:hover { color: var(--honey-light); }

/* ── Architecture flow ────────────────────────────────────── */
.flow {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.flow-step {
  flex: 1;
  min-width: 180px;
  background: var(--grey-900);
  border: 1px solid var(--grey-800);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.flow-num {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--honey-15);
  color: var(--honey);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.flow-step strong {
  font-size: 14px;
  color: var(--white);
  font-weight: 600;
}
.flow-step p {
  font-size: 13px;
  color: var(--grey-400);
  line-height: 1.5;
}
.flow-step code {
  background: var(--grey-800);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-family: 'DM Sans', monospace;
  color: var(--honey-light);
}
.flow-arrow {
  display: flex;
  align-items: center;
  color: var(--grey-700);
  font-size: 20px;
}

/* ── Section heading ──────────────────────────────────────── */
.section-heading {
  margin-top: 80px;
  margin-bottom: 8px;
}
.section-heading h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: var(--white);
}

/* ── Demo page ────────────────────────────────────────────── */
.demo-header {
  margin-bottom: 40px;
}
.demo-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--white);
  margin-bottom: 12px;
}
.demo-header p {
  font-size: 16px;
  color: var(--grey-400);
  max-width: 540px;
}

/* ── Task input area ──────────────────────────────────────── */
.demo-input-group {
  margin-bottom: 24px;
}
.demo-input-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--grey-400);
  margin-bottom: 8px;
}
textarea {
  width: 100%;
  background: var(--grey-900);
  border: 1px solid var(--grey-800);
  border-radius: var(--radius-md);
  padding: 16px;
  color: var(--white);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.15s;
}
textarea:focus {
  outline: none;
  border-color: var(--honey);
}
textarea::placeholder {
  color: var(--grey-600);
}

input[type="text"] {
  width: 100%;
  background: var(--grey-900);
  border: 1px solid var(--grey-800);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--white);
  font-family: var(--font);
  font-size: 14px;
  transition: border-color 0.15s;
}
input[type="text"]:focus {
  outline: none;
  border-color: var(--honey);
}
input[type="text"]::placeholder {
  color: var(--grey-600);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-primary {
  background: var(--honey);
  color: var(--black);
}
.btn-primary:hover { background: var(--honey-light); }
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-secondary {
  background: transparent;
  border: 1px solid var(--grey-700);
  color: var(--grey-300);
}
.btn-secondary:hover {
  border-color: var(--grey-500);
  color: var(--white);
}
.btn-full { width: 100%; }

.run-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid transparent;
  border-top-color: var(--black);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Result panel ─────────────────────────────────────────── */
.result-panel {
  margin-top: 28px;
  background: var(--grey-900);
  border: 1px solid var(--grey-800);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.result-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.result-badge {
  background: var(--honey-15);
  color: var(--honey);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.result-model {
  color: var(--grey-600);
  font-size: 12px;
}
.result-content {
  font-size: 14px;
  line-height: 1.7;
  color: var(--grey-300);
}
.result-content p { margin-bottom: 12px; }
.result-content p:last-child { margin-bottom: 0; }

/* Entity tags */
.entity-group { margin-bottom: 16px; }
.entity-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--honey-dark);
  margin-bottom: 8px;
}
.entity-list { display: flex; flex-wrap: wrap; gap: 6px; }
.entity-tag {
  background: var(--grey-800);
  border: 1px solid var(--grey-700);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--white);
}

/* Sentiment badge */
.sentiment-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}
.sentiment-badge.positive { background: rgba(58,158,107,0.15); color: var(--success); }
.sentiment-badge.negative { background: rgba(217,79,79,0.15); color: var(--error); }
.sentiment-badge.neutral  { background: var(--grey-800); color: var(--grey-300); }
.sentiment-badge.mixed    { background: rgba(232,168,56,0.15); color: var(--warning); }

/* Research trace */
.trace-step {
  margin-bottom: 24px;
  padding-left: 20px;
  border-left: 2px solid var(--grey-800);
}
.trace-step-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--honey-dark);
  margin-bottom: 8px;
}
.trace-question {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 4px;
}
.trace-answer {
  font-size: 14px;
  color: var(--grey-300);
  margin-bottom: 12px;
}
.trace-synthesis {
  font-size: 15px;
  line-height: 1.7;
  color: var(--grey-200);
  padding: 20px;
  background: var(--honey-10);
  border-radius: var(--radius-md);
  border: 1px solid var(--honey-15);
}

/* Raw output toggle */
.raw-output {
  margin-top: 16px;
  border-top: 1px solid var(--grey-800);
  padding-top: 12px;
}
.raw-output summary {
  font-size: 12px;
  color: var(--grey-600);
  cursor: pointer;
  font-weight: 500;
}
.raw-output pre {
  margin-top: 8px;
  font-size: 12px;
  color: var(--grey-500);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: 'DM Sans', monospace;
}

/* ── Error panel ──────────────────────────────────────────── */
.error-panel {
  margin-top: 20px;
  background: rgba(217,79,79,0.08);
  border: 1px solid rgba(217,79,79,0.2);
  border-radius: var(--radius-md);
  padding: 16px;
  color: var(--error);
  font-size: 14px;
}

/* ── Duration badge ───────────────────────────────────────── */
.duration-badge {
  font-size: 12px;
  color: var(--grey-500);
}

/* ── Tech stack section ───────────────────────────────────── */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.stack-item {
  background: var(--grey-900);
  border: 1px solid var(--grey-800);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.stack-item h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 4px;
}
.stack-item p {
  font-size: 13px;
  color: var(--grey-400);
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--grey-800);
  padding: 40px 0;
  text-align: center;
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 40px;
}
.footer-brand {
  font-size: 14px;
  font-weight: 600;
  color: var(--grey-400);
  margin-bottom: 4px;
}
.footer-note {
  font-size: 12px;
  color: var(--grey-600);
  margin-bottom: 8px;
}
.footer-link a {
  font-size: 12px;
  color: var(--honey-dark);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-inner { padding: 0 20px; gap: 16px; }
  .nav-links { gap: 16px; overflow-x: auto; }
  .nav-links a { white-space: nowrap; }
  .nav-version { display: none; }
  .page, .page-narrow { padding: 40px 20px; }
  .hero { padding: 48px 0 40px; }
  .flow { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); justify-content: center; }
}

@media (max-width: 480px) {
  .nav-links { display: none; }
  .cards-grid { grid-template-columns: 1fr; }
}
