/* Corporate Theme — MantleKit */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

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

:root {
  --bg: #f8f9fc;
  --fg: #1a1f35;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --card-bg: #ffffff;
  --muted: #6b7194;
  --secondary-bg: #eef0f6;
  --border: #dde1ec;
  --radius: 0.375rem;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --max-w: 1140px;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ========== NAVBAR ========== */
.navbar {
  height: 4rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.navbar-brand {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--fg);
}
.navbar-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.navbar-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
}
.navbar-links a:hover, .navbar-links a.active { color: var(--fg); }
.navbar-cta .btn { font-size: 0.8125rem; padding: 0.45rem 1rem; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.35rem;
  cursor: pointer;
  color: var(--fg);
}
.nav-toggle svg { width: 20px; height: 20px; }

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-outline {
  background: transparent;
  color: var(--fg);
  border-color: var(--border);
}
.btn-outline:hover { border-color: var(--fg); }
.btn-white {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}
.btn-white:hover { background: #f0f4ff; }
.btn-white-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}
.btn-white-outline:hover { border-color: #fff; }

/* ========== EYEBROW ========== */
.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

/* ========== HERO ========== */
.hero {
  position: relative;
  overflow: hidden;
  padding: 6rem 0 5rem;
  text-align: center;
}
.hero-threads {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
}
.hero h1 {
  font-size: 3.25rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}
.hero h1 .highlight { color: var(--primary); }
.hero p {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 2rem;
}
.hero-buttons { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ========== LOGO BAR ========== */
.logo-bar {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.logo-bar p {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.logo-bar-logos {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}
.logo-bar-logos span {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--muted);
  opacity: 0.5;
}

/* ========== STATS BAR ========== */
.stats-bar {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
}
.stats-bar .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}
.stat { padding: 1rem; border-right: 1px solid var(--border); }
.stat:last-child { border-right: none; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--fg); }
.stat-label { font-size: 0.8125rem; color: var(--muted); margin-top: 0.25rem; }

/* ========== SECTION HELPERS ========== */
.section { padding: 5rem 0; }
.section-alt { background: var(--secondary-bg); }
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
}
.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.section-header p { color: var(--muted); font-size: 1rem; }

/* ========== FEATURES GRID ========== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: box-shadow 0.2s;
}
.feature-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.07); }
.feature-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--secondary-bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--primary);
}
.feature-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.875rem; color: var(--muted); line-height: 1.55; }

/* ========== CODE PREVIEW ========== */
.code-section { padding: 5rem 0; }
.code-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.code-left h2 { font-size: 2rem; font-weight: 700; margin-bottom: 1rem; }
.code-left p { color: var(--muted); font-size: 0.9375rem; margin-bottom: 1.5rem; }
.checklist { list-style: none; margin-bottom: 1.5rem; }
.checklist li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--fg);
  margin-bottom: 0.5rem;
}
.checklist li::before {
  content: '';
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  background-size: 14px;
  background-repeat: no-repeat;
  background-position: center;
}
.code-block {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.code-block-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--secondary-bg);
  font-size: 0.8125rem;
  color: var(--muted);
}
.code-dots { display: flex; gap: 0.35rem; margin-right: 0.5rem; }
.code-dots span {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--border);
}
.code-block pre {
  padding: 1.25rem;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.8125rem;
  line-height: 1.7;
  overflow-x: auto;
  color: var(--fg);
}
.code-block .c-kw { color: var(--fg); font-weight: 600; }
.code-block .c-str { color: var(--primary); }
.code-block .c-val { color: var(--muted); }
.code-block .c-cmt { color: #a0a4b8; font-style: italic; }

/* ========== ENTERPRISE SECTION ========== */
.enterprise { padding: 5rem 0; background: var(--secondary-bg); }
.enterprise .section-header { margin-bottom: 2.5rem; }
.enterprise-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.enterprise-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: box-shadow 0.2s;
}
.enterprise-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.07); }
.enterprise-card .icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  background: var(--secondary-bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--primary);
}
.enterprise-card h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem; }
.enterprise-card p { font-size: 0.875rem; color: var(--muted); }

/* ========== TESTIMONIALS ========== */
.testimonials { padding: 5rem 0; }
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.testimonial-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.testimonial-card p {
  font-size: 0.9375rem;
  color: var(--fg);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.testimonial-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--secondary-bg);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8125rem;
  color: var(--primary);
  flex-shrink: 0;
}
.testimonial-name { font-weight: 600; font-size: 0.875rem; }
.testimonial-role { font-size: 0.8125rem; color: var(--muted); }

/* ========== PRICING ========== */
.pricing { padding: 5rem 0; background: var(--secondary-bg); }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 720px;
  margin: 0 auto;
}
.pricing-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}
.pricing-card.featured { border-color: var(--primary); }
.pricing-card .tier { font-size: 0.875rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.pricing-card .price {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0.5rem 0 0.25rem;
}
.pricing-card .price-note { font-size: 0.8125rem; color: var(--muted); margin-bottom: 1.5rem; }
.pricing-card ul {
  list-style: none;
  margin-bottom: 1.5rem;
}
.pricing-card ul li {
  font-size: 0.875rem;
  color: var(--fg);
  padding: 0.4rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pricing-card ul li::before {
  content: '';
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  background-size: 11px;
  background-repeat: no-repeat;
  background-position: center;
}
.pricing-card .btn { width: 100%; }

/* ========== BLOG PREVIEW ========== */
.blog-preview { padding: 5rem 0; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.blog-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.blog-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.07); }
.blog-card-img {
  height: 180px;
  background: var(--secondary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.8125rem;
}
.blog-card-body { padding: 1.25rem; }
.blog-pill {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius);
  background: var(--secondary-bg);
  color: var(--primary);
  margin-bottom: 0.75rem;
}
.blog-card-body h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.5rem; }
.blog-card-body p { font-size: 0.8125rem; color: var(--muted); }
.blog-card-meta { font-size: 0.75rem; color: var(--muted); margin-top: 0.75rem; }

/* ========== FAQ ========== */
.faq-section { padding: 5rem 0; }
.faq-list { max-width: 720px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: var(--card-bg);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  padding: 1rem 1.25rem;
  background: none;
  border: none;
  font-family: var(--font);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--fg);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
}
.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--muted);
  transition: transform 0.2s;
}
.faq-item.open .faq-question::after { content: '-'; }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-item.open .faq-answer { max-height: 300px; }
.faq-answer-inner {
  padding: 0 1.25rem 1rem;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ========== CTA ========== */
.cta {
  padding: 5rem 0;
  background: var(--primary);
  text-align: center;
  color: #fff;
}
.cta h2 { font-size: 2rem; font-weight: 700; margin-bottom: 0.75rem; }
.cta p { font-size: 1rem; opacity: 0.85; margin-bottom: 2rem; max-width: 480px; margin-left: auto; margin-right: auto; }
.cta-buttons { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* ========== FOOTER ========== */
.footer {
  padding: 4rem 0 0;
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}
.footer-brand p { font-size: 0.875rem; color: var(--muted); margin-top: 0.75rem; max-width: 280px; line-height: 1.6; }
.footer-col h4 {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul a {
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 0.2s;
}
.footer-col ul a:hover { color: var(--fg); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

/* ========== THEME SWITCHER ========== */
.theme-switcher {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
}
.theme-switcher-btn {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  cursor: pointer;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-switcher-dropdown {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  min-width: 160px;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: none;
  overflow-x: hidden;
}
.theme-switcher-dropdown.open { display: block; }
.theme-switcher-dropdown a {
  display: block;
  padding: 0.6rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}
.theme-switcher-dropdown a:hover { background: var(--secondary-bg); color: var(--fg); }
.theme-switcher-dropdown a.current { color: var(--primary); font-weight: 600; background: var(--secondary-bg); }

/* ========== PAGE-LEVEL LAYOUTS ========== */
.page-header {
  padding: 4rem 0 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.page-header h1 { font-size: 2.25rem; font-weight: 700; margin-bottom: 0.75rem; }
.page-header p { color: var(--muted); font-size: 1.0625rem; max-width: 540px; margin: 0 auto; }
.page-content { padding: 4rem 0; }

/* ========== FORM ========== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--fg);
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 0.6rem 0.85rem;
  font-family: var(--font);
  font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  color: var(--fg);
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* Sidebar card */
.sidebar-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.sidebar-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; }
.sidebar-card p { font-size: 0.875rem; color: var(--muted); margin-bottom: 0.5rem; }

/* ========== TEAM / ABOUT ========== */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.team-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: box-shadow 0.2s;
}
.team-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.07); }
.team-avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--secondary-bg);
  border: 2px solid var(--primary);
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary);
  font-size: 1.125rem;
}
.team-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; }
.team-card .role { font-size: 0.8125rem; color: var(--muted); margin-bottom: 0.75rem; }
.team-card p { font-size: 0.8125rem; color: var(--muted); }

/* Mission */
.mission {
  padding: 4rem 0;
  background: var(--secondary-bg);
}
.mission .container { max-width: 720px; text-align: center; }
.mission h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: 1rem; }
.mission p { color: var(--muted); font-size: 1rem; line-height: 1.7; }

/* ========== KB ========== */
.kb-search {
  max-width: 540px;
  margin: 0 auto 3rem;
}
.kb-search input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font);
  font-size: 0.9375rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  color: var(--fg);
}
.kb-search input:focus { outline: none; border-color: var(--primary); }
.kb-category { margin-bottom: 2.5rem; }
.kb-category h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
.kb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.kb-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: box-shadow 0.2s;
}
.kb-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.07); }
.kb-card h3 { font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.35rem; }
.kb-card p { font-size: 0.8125rem; color: var(--muted); }

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .navbar-links {
    display: none;
    position: absolute;
    top: 4rem;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0.75rem;
  }
  .navbar-links.open { display: flex; }
  .navbar-cta { display: none; }

  .hero { padding: 4rem 0 3rem; }
  .hero h1 { font-size: 2.25rem; }

  .stats-bar .container { grid-template-columns: repeat(2, 1fr); }
  .stat { border-right: none; }

  .features-grid,
  .enterprise-grid,
  .testimonials-grid,
  .blog-grid,
  .team-grid,
  .kb-grid { grid-template-columns: 1fr; }

  .pricing-grid { grid-template-columns: 1fr; }
  .code-split { grid-template-columns: 1fr; gap: 2rem; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}
