/* Shared styles for the Yeda AI knowledge base (/kb).
   Replicates the marketing-site chrome (header, footer, background) as plain
   CSS so the static KB pages match yeda-ai.com without React/MUI.
   Palette + values transcribed from Header.tsx, Footer.tsx, App.tsx, index.css. */

:root {
  color-scheme: dark;

  /* Page — matches the live site body gradient (index.css) */
  --page-bg: #0a0f1e;              /* html base — index.css :root */
  --page-grad-a: #0a0f1e;          /* index.css body gradient start */
  --page-grad-b: #1a1a2e;          /* index.css body gradient end */
  --text: #f7f8f8;                 /* App.tsx text.primary */
  --muted: #9aa1a9;
  --panel: rgba(20, 30, 52, 0.55); /* blue-tinted surface for cards/code/CTA */
  --border: rgba(100, 180, 255, 0.12); /* blue-tinted borders, like the site */

  /* Brand accents */
  --accent: #3B82F6;
  --accent-light: #64B4FF;

  /* Header */
  --hdr-bg: rgba(11, 20, 38, 0.95);
  --hdr-border: rgba(100, 180, 255, 0.1);
  --hdr-border-strong: rgba(100, 180, 255, 0.3);
  --hdr-border-hover: rgba(100, 180, 255, 0.5);
  --nav-text: rgba(226, 232, 240, 0.8);
  --hover-bg: rgba(100, 180, 255, 0.1);

  /* Footer */
  --footer-bg: rgba(8, 15, 28, 0.98);
  --footer-border: rgba(100, 180, 255, 0.1);
  --footer-heading: #E2E8F0;
  --footer-text: rgba(226, 232, 240, 0.6);
  --footer-text-desc: rgba(226, 232, 240, 0.5);
  --footer-text-dim: rgba(226, 232, 240, 0.4);

  --font: "Inter", "system-ui", "-apple-system", "BlinkMacSystemFont",
    "Segoe UI", "Roboto", "Helvetica", "Arial", sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--page-bg); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, var(--page-grad-a) 0%, var(--page-grad-b) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ============================ Header ============================ */
.yeda-header {
  position: sticky;
  top: 0;
  z-index: 1100;
  background: var(--hdr-bg);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hdr-border);
}
.yeda-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.yeda-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }

.yeda-logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.yeda-logo-badge {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, #1E3A5F 0%, #0F2439 100%);
  border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1px solid var(--hdr-border-strong);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.25), inset 0 1px 0 rgba(100, 180, 255, 0.1);
  transition: all 0.3s ease;
}
.yeda-logo:hover .yeda-logo-badge { transform: translateY(-1px); }
.yeda-logo-ai {
  font-size: 0.55rem; font-weight: 700; line-height: 1; letter-spacing: 0.5px;
  background: linear-gradient(135deg, #64B4FF, #3B82F6);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.yeda-brand { display: flex; align-items: baseline; gap: 5px; }
.yeda-brand-name {
  font-weight: 700; font-size: 1.4rem; letter-spacing: -0.5px;
  background: linear-gradient(135deg, #FFFFFF 0%, #E2E8F0 50%, #CBD5E1 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.yeda-brand-ai {
  font-weight: 600; font-size: 1.05rem; letter-spacing: 1px;
  background: linear-gradient(135deg, #64B4FF 0%, #3B82F6 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

.yeda-nav { display: flex; align-items: center; gap: 8px; }
.yeda-navlink {
  position: relative; padding: 6px 12px; color: var(--nav-text);
  font-size: 0.9rem; font-weight: 500; text-decoration: none;
  text-transform: uppercase; letter-spacing: 0.02857em; border-radius: 4px;
  transition: all 0.3s ease;
}
.yeda-navlink:hover { color: var(--accent-light); }
.yeda-navlink.is-active { color: var(--accent-light); font-weight: 600; }
.yeda-navlink.is-active::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 0; width: 40%; height: 2px; background: var(--accent-light); border-radius: 1px;
}
.yeda-navlink--outlined {
  border: 1px solid var(--hdr-border-strong); border-radius: 6px; padding: 6px 20px;
}
.yeda-navlink--outlined:hover { border-color: var(--hdr-border-hover); background: var(--hover-bg); }
.yeda-signin {
  margin-left: 8px; padding: 6px 20px; color: #fff; font-size: 0.9rem; font-weight: 500;
  text-decoration: none; text-transform: uppercase; letter-spacing: 0.02857em; border-radius: 6px;
  background: linear-gradient(135deg, #3B82F6 0%, #64B4FF 100%); transition: all 0.3s ease;
}
.yeda-signin:hover { background: linear-gradient(135deg, #2563EB 0%, #3B82F6 100%); }

.yeda-hamburger { display: none; border: none; background: transparent; color: var(--accent-light); cursor: pointer; padding: 8px; }
.yeda-hamburger a { color: inherit; display: inline-flex; }

@media (max-width: 899.95px) {
  .yeda-container { padding: 0 16px; }
  .yeda-toolbar { min-height: 56px; }
  .yeda-nav { display: none; }
  .yeda-hamburger { display: inline-flex; }
}

/* ============================ Content ============================ */
.wrap { width: 100%; max-width: 760px; margin: 0 auto; padding: 40px 20px 64px; flex: 1 0 auto; }

.tag {
  display: inline-block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--accent-light); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 12px; margin-bottom: 16px;
}
h1 { font-size: 2rem; line-height: 1.25; margin: 0 0 12px; }
.lede { color: var(--muted); font-size: 1.05rem; margin-bottom: 32px; }
h2 { font-size: 1.3rem; margin: 40px 0 12px; }
a { color: var(--accent-light); }
ol, ul { padding-left: 1.3em; }
li { margin: 8px 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
th { background: var(--panel); }
pre {
  background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px; overflow-x: auto; font-size: 0.875rem; line-height: 1.55;
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
p code, li code, td code {
  background: var(--panel); border: 1px solid var(--border); border-radius: 5px;
  padding: 1px 5px; font-size: 0.875em;
}
.cta {
  margin-top: 48px; background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px 24px;
}
.cta p { margin: 0 0 6px; }

/* ============================ Index pages ============================ */
.kb-hero { margin-bottom: 8px; }
.kb-hero p.lede { margin-bottom: 24px; }
.kb-cat { margin: 40px 0 16px; }
.kb-cat h2 { margin: 0 0 4px; }
.kb-cat p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.kb-cards { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 20px; }
.kb-card {
  display: block; text-decoration: none; color: inherit; background: var(--panel);
  border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.kb-card:hover { border-color: var(--hdr-border-hover); transform: translateY(-2px); }
.kb-card .kb-num { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-light); }
.kb-card h3 { margin: 6px 0 6px; font-size: 1.1rem; line-height: 1.3; color: var(--text); }
.kb-card p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }

/* ============================ Footer ============================ */
.site-footer {
  padding: 20px 0; background: var(--footer-bg); border-top: 1px solid var(--footer-border);
  margin-top: auto; flex-shrink: 0;
}
.footer-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.footer-col { min-width: 0; }
.footer-logo { font-weight: 700; font-size: 1.1rem; color: var(--footer-heading); margin-bottom: 8px; }
.footer-tagline { margin: 0 0 4px; color: var(--footer-heading); font-weight: 600; font-size: 0.85rem; line-height: 1.33; }
.footer-desc { margin: 0; color: var(--footer-text-desc); max-width: 300px; font-size: 0.75rem; line-height: 1.5; }
.footer-heading { margin: 0 0 8px; color: var(--footer-heading); font-weight: 600; font-size: 0.9rem; }
.footer-links { display: flex; flex-direction: column; gap: 4px; }
.footer-links a { color: var(--footer-text); text-decoration: none; font-size: 0.8rem; line-height: 1.4; transition: color 0.3s; }
.footer-links a:hover { color: var(--accent-light); }
.footer-link-icon { display: flex; align-items: center; gap: 4px; }
.footer-link-icon svg { flex-shrink: 0; }
.footer-social { display: flex; gap: 4px; }
.footer-social-btn { display: inline-flex; align-items: center; justify-content: center; padding: 4px; color: var(--footer-text); border-radius: 50%; transition: color 0.3s; }
.footer-social-btn:hover { color: var(--accent-light); }
.footer-bottom { border-top: 1px solid var(--footer-border); margin-top: 16px; padding-top: 12px; }
.footer-bottom p { margin: 0; text-align: center; color: var(--footer-text-dim); font-size: 0.8rem; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}
