/* DLS AI Chatbot — Project Guide */

:root {
  --bg: #0c0f14;
  --bg-alt: #12171f;
  --surface: #1a2130;
  --surface-hover: #222b3d;
  --border: #2a3548;
  --text: #e8ecf4;
  --text-muted: #8b95a8;
  --accent: #3d9cf5;
  --accent-soft: rgba(61, 156, 245, 0.12);
  --accent-glow: rgba(61, 156, 245, 0.25);
  --green: #34d399;
  --purple: #a78bfa;
  --orange: #fb923c;
  --radius: 12px;
  --radius-lg: 20px;
  --font: 'DM Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --max-width: 960px;
}

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

html {
  scroll-behavior: smooth;
}

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

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface);
  padding: 0.15em 0.45em;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--green);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Hero */
.hero {
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, var(--accent-glow), transparent),
    linear-gradient(180deg, var(--bg-alt) 0%, var(--bg) 100%);
  padding: 1.5rem 1.5rem 4rem;
  border-bottom: 1px solid var(--border);
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.nav-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: opacity 0.2s;
}

.nav-link:hover {
  opacity: 0.8;
}

.hero-content {
  max-width: var(--max-width);
  margin: 0 auto;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 1.75rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-tags span {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-intro {
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 720px;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.card-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.card-small h3 {
  font-size: 0.95rem;
}

/* Steps */
.steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.steps li {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.step-num {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
}

.steps h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.steps p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Flow diagram */
.flow-diagram {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.flow-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.flow-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  text-align: center;
  font-weight: 500;
  font-size: 0.92rem;
  min-width: 140px;
}

.flow-box small {
  display: block;
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-top: 0.25rem;
}

.flow-box.user { border-color: var(--purple); color: var(--purple); }
.flow-box.api { border-color: var(--accent); color: var(--accent); }
.flow-box.pinecone { border-color: var(--green); color: var(--green); }
.flow-box.prompt { border-color: var(--orange); color: var(--orange); }
.flow-box.groq { border-color: var(--accent); color: var(--accent); }
.flow-box.reply { border-color: var(--green); color: var(--green); }

.flow-arrow,
.flow-plus {
  color: var(--text-muted);
  font-size: 1.25rem;
  font-weight: 300;
}

.flow-arrow-down {
  text-align: center;
  color: var(--text-muted);
  padding: 0.5rem 0;
  font-size: 1.25rem;
}

.flow-note {
  color: var(--text-muted);
  font-size: 0.92rem;
  text-align: center;
}

/* Two column */
.two-col {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: start;
  margin-bottom: 2rem;
}

.two-col p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.two-col p strong {
  color: var(--text);
}

.info-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.info-box h3 {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  color: var(--accent);
}

.info-box ul {
  list-style: none;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.info-box li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}

.info-box li:last-child {
  border-bottom: none;
}

.info-foot {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.analogy {
  background: var(--accent-soft);
  border: 1px solid rgba(61, 156, 245, 0.3);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.analogy h3 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.analogy p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Data folder visual */
.data-visual {
  margin-bottom: 2rem;
}

.folder-tree {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.8;
  overflow-x: auto;
}

.folder-tree .folder { color: var(--accent); }
.folder-tree .file { color: var(--green); }
.folder-tree .comment { color: var(--text-muted); }

.command-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 2rem;
}

.command-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.command-block code {
  display: block;
  font-size: 1.1rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  background: var(--bg);
}

.command-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Structure list */
.structure-list details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.structure-list summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s;
}

.structure-list summary:hover {
  background: var(--surface-hover);
}

.structure-list summary::before {
  content: '▸';
  color: var(--accent);
  transition: transform 0.2s;
}

.structure-list details[open] summary::before {
  transform: rotate(90deg);
}

.structure-children {
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
}

.structure-children > p {
  padding-top: 1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.structure-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.structure-item:last-child {
  border-bottom: none;
}

.structure-item code {
  align-self: start;
}

.structure-item span {
  color: var(--text-muted);
}

/* Commands grid */
.commands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.command-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.cmd-step {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.command-card code {
  display: block;
  font-size: 0.85rem;
  word-break: break-all;
  background: var(--bg);
  margin-bottom: 0.35rem;
}

.command-card small {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Footer */
.footer {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links {
  margin-top: 0.75rem;
}

.footer-links a {
  color: var(--accent);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-links span {
  color: var(--border);
  margin: 0 0.35rem;
}

/* Responsive */
@media (max-width: 768px) {
  .two-col {
    grid-template-columns: 1fr;
  }

  .structure-item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .flow-box {
    min-width: 120px;
    font-size: 0.85rem;
  }
}
