/* ===========================================
   SIMPLERLLM HUB - Main Styles
   =========================================== */

/* CSS Variables — bridged onto the site-wide studio tokens (tokens.css).
   Scoped to .sllm-page (not :root): the theme tokens live on
   <body data-theme="build">, so they only resolve inside <body>. */
.sllm-page {
  --sllm-primary: var(--accent, #6366f1);
  --sllm-primary-hover: var(--accent-strong, #4f46e5);
  --sllm-text: var(--ink, #1a1a2e);
  --sllm-text-muted: var(--muted, #6b6b7b);
  --sllm-text-light: color-mix(in srgb, var(--muted, #6b6b7b) 62%, var(--surface, #fffef7));
  --sllm-text-secondary: var(--muted, #6b6b7b);
  --sllm-border: var(--line, rgba(26, 26, 46, 0.12));
  --sllm-border-light: color-mix(in srgb, var(--line, rgba(26, 26, 46, 0.12)) 65%, transparent);
  --sllm-bg: var(--surface, #fffef7);
  --sllm-bg-subtle: var(--surface-2, #faf8f5);
  --sllm-bg-accent: color-mix(in srgb, var(--accent, #6366f1) 8%, var(--surface, #fffef7));
  --sllm-bg-accent-border: color-mix(in srgb, var(--accent, #6366f1) 22%, transparent);
  --sllm-green: #2a9d6e;
  --sllm-yellow: #b8860b;
  --sllm-green-bg: #ecf7e8;
  --sllm-green-text: #3b6d11;
  --sllm-orange-bg: #fef6e4;
  --sllm-orange-text: #854f0b;
  --sllm-red-bg: #fdeee8;
  --sllm-red-text: #993c1d;
}

/* ===========================================
   PAGE CONTAINER
   =========================================== */

.sllm-page {
  font-family: var(--font-body, 'Inter', system-ui, sans-serif);
  color: var(--sllm-text);
  background: var(--sllm-bg);
}

/* Contained width — matches the site header
   (max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 in components/navbar.html). */
.sllm-container,
.sllm-header-inner {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .sllm-container,
  .sllm-header-inner {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .sllm-container,
  .sllm-header-inner {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* ===========================================
   BREADCRUMB
   =========================================== */

.sllm-breadcrumb {
  padding: 8px 28px;
  font-size: 12px;
  color: var(--sllm-text-light);
  background: var(--sllm-bg-subtle);
  border-bottom: 1px solid var(--sllm-border-light);
}

.sllm-breadcrumb b {
  color: var(--sllm-text-muted);
  font-weight: 400;
}

/* ===========================================
   SITE HEADER (brand + sub-navigation)
   =========================================== */

.sllm-header {
  background: var(--sllm-bg);
  border-bottom: 1px solid var(--sllm-border-light);
}

.sllm-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.sllm-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--sllm-text);
  padding: 10px 0;
}

.sllm-brand-name {
  font-family: var(--font-display, 'Space Grotesk', system-ui, sans-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--sllm-text);
}

.sllm-brand-name span {
  color: var(--sllm-primary);
}

.sllm-subnav {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.sllm-subnav-item {
  padding: 12px 18px;
  font-size: 13px;
  color: var(--sllm-text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  text-decoration: none;
  transition: color 0.15s;
}

.sllm-subnav-item:hover {
  color: var(--sllm-text);
}

.sllm-subnav-item--active {
  color: var(--sllm-primary);
  border-bottom-color: var(--sllm-primary);
  font-weight: 500;
}

@media (max-width: 640px) {
  .sllm-header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
  }
  .sllm-brand {
    padding: 12px 20px;
    border-bottom: 1px solid var(--sllm-border-light);
  }
  .sllm-subnav {
    overflow-x: auto;
    padding: 0 12px;
    scrollbar-width: none;
  }
  .sllm-subnav::-webkit-scrollbar { display: none; }
}

/* ===========================================
   HERO SECTION
   =========================================== */

.sllm-hero {
  padding: 56px 0 48px;
  text-align: center;
}

.sllm-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--sllm-bg-accent);
  color: var(--sllm-primary);
  padding: 5px 16px;
  border-radius: var(--radius-pill, 999px);
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 16px;
  border: 1px solid var(--sllm-bg-accent-border);
}

.sllm-hero-title {
  font-family: var(--font-display, 'Space Grotesk', system-ui, sans-serif);
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--sllm-text);
  margin-bottom: 12px;
}

.sllm-hero-title span {
  color: var(--sllm-primary);
}

.sllm-hero-subtitle {
  font-size: 15px;
  color: var(--sllm-text-secondary);
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto 28px;
}

.sllm-hero-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.sllm-btn-primary {
  background: var(--sllm-primary);
  color: #fff;
  border: none;
  padding: 11px 22px;
  border-radius: var(--radius-pill, 999px);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-mono, monospace);
  letter-spacing: -0.3px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--accent, #6366f1) 35%, transparent);
  transition: background 0.15s ease, transform 0.15s ease;
}

.sllm-btn-primary:hover {
  background: var(--sllm-primary-hover);
  transform: translateY(-2px);
}

.sllm-btn-outline {
  background: transparent;
  color: var(--sllm-text);
  border: 1px solid var(--sllm-border);
  padding: 11px 20px;
  border-radius: var(--radius-pill, 999px);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.sllm-btn-outline:hover {
  background: color-mix(in srgb, var(--accent, #6366f1) 8%, transparent);
  border-color: var(--sllm-primary);
  color: var(--sllm-primary);
}

/* Code Window */
.sllm-code-window {
  background: var(--sllm-bg-subtle);
  border: 1px solid var(--sllm-border);
  border-radius: var(--radius, 14px);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(26, 26, 46, 0.06));
  max-width: 680px;
  margin: 0 auto;
  text-align: left;
  overflow: hidden;
}

.sllm-code-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--sllm-border);
  background: var(--sllm-bg-subtle);
}

.sllm-code-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.sllm-code-dot--red { background: #e8a0a0; }
.sllm-code-dot--yellow { background: #e8d5a0; }
.sllm-code-dot--green { background: #a0d4a0; }

.sllm-code-filename {
  font-size: 11px;
  color: var(--sllm-text-light);
  margin-left: 8px;
}

.sllm-code-body {
  padding: 16px 18px;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--sllm-text);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.sllm-code-body > div {
  white-space: nowrap;
}

.sllm-code-keyword { color: var(--sllm-primary); }
.sllm-code-string { color: var(--sllm-green); }
.sllm-code-number { color: var(--sllm-yellow); }
.sllm-code-comment { color: var(--sllm-text-light); }

.sllm-code-output {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--sllm-border);
  color: var(--sllm-text-light);
  font-size: 12px;
  white-space: normal !important; /* typed output wraps; code lines scroll */
}

.sllm-code-output-text {
  color: var(--sllm-text);
}

.sllm-code-cursor {
  display: inline-block;
  width: 2px;
  height: 13px;
  background: var(--sllm-primary);
  vertical-align: text-bottom;
  animation: sllm-blink 1s step-end infinite;
}

@keyframes sllm-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ===========================================
   STATS SECTION
   =========================================== */

.sllm-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 28px 0 24px;
  flex-wrap: wrap;
}

.sllm-stat {
  text-align: center;
}

.sllm-stat-number {
  font-family: var(--font-display, 'Space Grotesk', system-ui, sans-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--sllm-text);
}

.sllm-stat-label {
  font-size: 12px;
  color: var(--sllm-text-muted);
  margin-top: 2px;
}

/* ===========================================
   DIVIDER
   =========================================== */

.sllm-divider {
  border: none;
  border-top: 1px solid var(--sllm-border-light);
  margin: 0;
}

/* ===========================================
   SECTION
   =========================================== */

.sllm-section {
  padding: 36px 0 0;
}

.sllm-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.sllm-section-title {
  font-family: var(--font-display, 'Space Grotesk', system-ui, sans-serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--sllm-text);
}

.sllm-section-link {
  font-size: 13px;
  color: var(--sllm-primary);
  text-decoration: none;
  cursor: pointer;
}

.sllm-section-link:hover {
  text-decoration: underline;
}

.sllm-section-subtitle {
  font-size: 14px;
  color: var(--sllm-text-muted);
  margin-bottom: 18px;
  line-height: 1.6;
}

/* ===========================================
   FEATURES GRID
   =========================================== */

.sllm-features-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 900px) {
  .sllm-features-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .sllm-features-grid {
    grid-template-columns: 1fr;
  }
}

.sllm-feature-card {
  background: var(--sllm-bg);
  border: 1px solid var(--sllm-border);
  border-radius: var(--radius, 14px);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(26, 26, 46, 0.06));
  padding: 20px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  text-decoration: none;
  display: block;
}

.sllm-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow, 0 8px 24px rgba(26, 26, 46, 0.08));
  border-color: color-mix(in srgb, var(--accent, #6366f1) 40%, var(--line, rgba(26, 26, 46, 0.12)));
}

.sllm-feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
  background: var(--sllm-bg-accent);
  color: var(--sllm-primary);
  border: 1px solid var(--sllm-bg-accent-border);
}

.sllm-feature-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--sllm-text);
  margin-bottom: 4px;
}

.sllm-feature-desc {
  font-size: 12.5px;
  color: var(--sllm-text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.sllm-feature-link {
  font-size: 12px;
  color: var(--sllm-primary);
  font-weight: 500;
}

/* ===========================================
   PLAYGROUND GRID
   =========================================== */

.sllm-playground-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 700px) {
  .sllm-playground-grid {
    grid-template-columns: 1fr;
  }
}

.sllm-playground-card {
  background: var(--sllm-bg);
  border: 1px solid var(--sllm-border);
  border-radius: var(--radius, 14px);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(26, 26, 46, 0.06));
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  text-decoration: none;
  display: block;
}

.sllm-playground-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow, 0 8px 24px rgba(26, 26, 46, 0.08));
  border-color: color-mix(in srgb, var(--accent, #6366f1) 40%, var(--line, rgba(26, 26, 46, 0.12)));
}

.sllm-playground-preview {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sllm-bg-subtle);
}

.sllm-playground-body {
  padding: 14px 18px;
}

.sllm-playground-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--sllm-text);
  margin-bottom: 3px;
}

.sllm-playground-desc {
  font-size: 12.5px;
  color: var(--sllm-text-muted);
  line-height: 1.4;
}

/* ===========================================
   PROJECTS GRID
   =========================================== */

.sllm-projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

@media (max-width: 900px) {
  .sllm-projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .sllm-projects-grid {
    grid-template-columns: 1fr;
  }
}

.sllm-project-card {
  background: var(--sllm-bg);
  border: 1px solid var(--sllm-border);
  border-radius: var(--radius, 14px);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(26, 26, 46, 0.06));
  padding: 18px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  text-decoration: none;
  display: block;
}

.sllm-project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow, 0 8px 24px rgba(26, 26, 46, 0.08));
  border-color: color-mix(in srgb, var(--accent, #6366f1) 40%, var(--line, rgba(26, 26, 46, 0.12)));
}

.sllm-project-card--featured {
  border-width: 1.5px;
  border-color: color-mix(in srgb, var(--accent, #6366f1) 30%, var(--line, rgba(26, 26, 46, 0.12)));
}

.sllm-project-badge {
  background: var(--sllm-bg-accent);
  color: var(--sllm-primary);
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: 500;
  border: 1px solid var(--sllm-bg-accent-border);
  display: inline-block;
  margin-bottom: 8px;
}

.sllm-project-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--sllm-text);
  margin-bottom: 4px;
}

.sllm-project-desc {
  font-size: 12.5px;
  color: var(--sllm-text-muted);
  line-height: 1.4;
  margin-bottom: 10px;
}

.sllm-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.sllm-tag {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

.sllm-tag--feature {
  background: var(--sllm-bg-accent);
  color: var(--sllm-primary);
}

.sllm-tag--beginner {
  background: var(--sllm-green-bg);
  color: var(--sllm-green-text);
}

.sllm-tag--intermediate {
  background: var(--sllm-orange-bg);
  color: var(--sllm-orange-text);
}

.sllm-tag--advanced {
  background: var(--sllm-red-bg);
  color: var(--sllm-red-text);
}

/* ===========================================
   MCP BANNER
   =========================================== */

.sllm-mcp-banner {
  background: var(--sllm-bg-subtle);
  border: 1px solid var(--sllm-border);
  border-radius: var(--radius, 14px);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(26, 26, 46, 0.06));
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: 680px;
  margin: 36px auto 0;
}

@media (max-width: 700px) {
  .sllm-mcp-banner {
    flex-direction: column;
    text-align: center;
  }
}

.sllm-mcp-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius, 14px);
  background: var(--sllm-bg-accent);
  border: 1px solid var(--sllm-bg-accent-border);
  color: var(--sllm-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sllm-mcp-content {
  min-width: 0;
}

.sllm-mcp-content h3 {
  font-family: var(--font-display, 'Space Grotesk', system-ui, sans-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--sllm-text);
  margin-bottom: 4px;
}

.sllm-mcp-content p {
  font-size: 13px;
  color: var(--sllm-text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.sllm-mcp-url {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 12px;
  background: var(--sllm-bg);
  border: 1px solid var(--sllm-border);
  border-radius: 8px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  word-break: break-all;
  color: var(--sllm-primary);
}

.sllm-mcp-copy {
  background: var(--sllm-primary);
  color: #fff;
  border: none;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  font-weight: 500;
}

.sllm-mcp-copy:hover {
  background: var(--sllm-primary-hover);
}

/* ===========================================
   QUICKSTART
   =========================================== */

.sllm-quickstart {
  margin: 36px 0 0;
  padding: 28px;
  background: var(--sllm-bg-subtle);
  border: 1px solid var(--sllm-border);
  border-radius: var(--radius, 14px);
}

.sllm-quickstart-title {
  font-family: var(--font-display, 'Space Grotesk', system-ui, sans-serif);
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 16px;
  color: var(--sllm-text);
}

.sllm-quickstart-grid {
  display: flex;
  gap: 10px;
}

@media (max-width: 800px) {
  .sllm-quickstart-grid {
    flex-direction: column;
  }
}

.sllm-quickstart-step {
  flex: 1;
  background: var(--sllm-bg);
  border: 1px solid var(--sllm-border);
  border-radius: var(--radius-sm, 10px);
  padding: 14px;
}

.sllm-quickstart-label {
  font-size: 11px;
  color: var(--sllm-text-light);
  margin-bottom: 5px;
  font-weight: 500;
}

.sllm-quickstart-code {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 11px;
  color: var(--sllm-text);
  line-height: 1.6;
}

/* ===========================================
   PROVIDERS
   =========================================== */

.sllm-providers {
  text-align: center;
  padding: 28px 0 36px;
}

.sllm-providers p {
  font-size: 12px;
  color: var(--sllm-text-light);
  margin-bottom: 10px;
}

.sllm-providers-list {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sllm-provider {
  background: var(--sllm-bg-subtle);
  border: 1px solid var(--sllm-border);
  border-radius: var(--radius-pill, 999px);
  padding: 6px 16px;
  font-size: 12px;
  color: var(--sllm-text-secondary);
}

/* ===========================================
   RESPONSIVE ADJUSTMENTS
   =========================================== */

@media (max-width: 640px) {
  .sllm-hero {
    padding: 40px 0 32px;
  }

  .sllm-hero-title {
    font-size: 30px;
  }

  .sllm-hero-subtitle {
    font-size: 14px;
  }

  .sllm-hero-buttons .sllm-btn-primary,
  .sllm-hero-buttons .sllm-btn-outline {
    width: 100%;
    justify-content: center;
  }

  .sllm-code-window {
    border-radius: var(--radius-sm, 10px);
  }

  .sllm-code-body {
    font-size: 11px;
    padding: 12px 14px;
  }

  .sllm-stats {
    gap: 24px;
  }

  .sllm-section {
    padding: 28px 0 0;
  }

  .sllm-breadcrumb {
    padding-left: 20px;
    padding-right: 20px;
  }

  .sllm-subnav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .sllm-subnav-item {
    white-space: nowrap;
    padding: 12px 14px;
  }

  .sllm-mcp-banner {
    padding: 20px;
    gap: 16px;
  }

  .sllm-providers {
    padding: 24px 0 32px;
  }
}
