/* ============================================================
   ZIEMACS AI — ziemacs.ai
   Single stylesheet for all pages
   IBM Plex Sans via Google Fonts
   ============================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue-90: #001d6c;
  --blue-80: #002d9c;
  --blue-70: #0043ce;
  --blue-60: #0f62fe;
  --blue-50: #4589ff;
  --blue-40: #78a9ff;
  --blue-20: #d0e2ff;
  --blue-10: #edf5ff;
  --teal-60: #007d79;
  --teal-50: #009d9a;
  --teal-40: #08bdba;
  --gray-100: #161616;
  --gray-90: #262626;
  --gray-80: #393939;
  --gray-70: #525252;
  --gray-60: #6f6f6f;
  --gray-50: #8d8d8d;
  --gray-30: #c6c6c6;
  --gray-20: #e0e0e0;
  --gray-10: #f4f4f4;
  --white: #ffffff;
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Consolas', monospace;
  --max-width: 1200px;
  --header-h: 64px;
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--gray-90);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-60); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }

/* --- Utility --- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.text-center { text-align: center; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px; border-radius: 4px; font-size: 0.9375rem;
  font-weight: 600; cursor: pointer; border: none;
  transition: background 0.15s, box-shadow 0.15s;
  text-decoration: none;
}
.btn-primary { background: var(--blue-60); color: var(--white); }
.btn-primary:hover { background: var(--blue-70); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--white); border: 2px solid var(--white); }
.btn-secondary:hover { background: rgba(255,255,255,0.1); text-decoration: none; }
.btn-teal { background: var(--teal-60); color: var(--white); }
.btn-teal:hover { background: var(--teal-50); text-decoration: none; }
.btn-outline { background: transparent; color: var(--blue-60); border: 2px solid var(--blue-60); }
.btn-outline:hover { background: var(--blue-10); text-decoration: none; }

/* --- Header --- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--white); border-bottom: 1px solid var(--gray-20);
  height: var(--header-h);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.site-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.site-logo img { width: 36px; height: 36px; border-radius: 6px; }
.site-logo span { font-size: 1.125rem; font-weight: 700; color: var(--gray-100); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 0.875rem; font-weight: 500; color: var(--gray-70);
  text-decoration: none; transition: color 0.15s;
}
.nav-links a:hover, .nav-links a.active { color: var(--blue-60); }
.nav-links .btn { font-size: 0.8125rem; padding: 8px 20px; color: var(--white); flex-shrink: 0; }
.nav-links .btn:hover { color: var(--white); }
.mobile-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 36px; height: 36px; align-items: center; justify-content: center;
}
.mobile-toggle svg { width: 24px; height: 24px; color: var(--gray-90); }

/* --- Mobile nav --- */
.mobile-nav {
  display: none; position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
  background: var(--white); z-index: 99; padding: 24px;
  flex-direction: column; gap: 4px;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  display: block; padding: 14px 16px; font-size: 1rem; font-weight: 500;
  color: var(--gray-90); border-radius: 6px; text-decoration: none;
}
.mobile-nav a:hover { background: var(--gray-10); }
.mobile-nav .btn { margin-top: 16px; text-align: center; }

/* --- Hero --- */
.hero {
  background: var(--blue-90); color: var(--white);
  padding: 80px 0 72px; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -40%; right: -20%; width: 60%; height: 180%;
  background: radial-gradient(ellipse, rgba(15,98,254,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero .container { text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero h1 { font-size: 2.75rem; font-weight: 700; line-height: 1.15; max-width: 720px; }
.hero .subtitle {
  font-size: 1.1875rem; line-height: 1.6; color: var(--blue-20);
  max-width: 640px; margin-top: 20px;
}
.hero .btn-row { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; justify-content: center; }
.hero-badge-strip {
  display: flex; gap: 24px; margin-top: 40px; flex-wrap: wrap; align-items: center; justify-content: center;
}
.hero-badge {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.8125rem; font-weight: 500; color: var(--blue-20);
  padding: 6px 14px; border: 1px solid rgba(255,255,255,0.15); border-radius: 20px;
}
.hero-badge svg { width: 16px; height: 16px; flex-shrink: 0; }

/* --- Sections --- */
.section { padding: 72px 0; }
.section-alt { background: var(--gray-10); }
.section-dark { background: var(--gray-100); color: var(--white); }
.section-title {
  font-size: 2rem; font-weight: 700; color: var(--gray-100);
  margin-bottom: 12px;
}
.section-dark .section-title { color: var(--white); }
.section-subtitle {
  font-size: 1.125rem; color: var(--gray-70); max-width: 640px;
  margin-bottom: 48px;
}
.section-dark .section-subtitle { color: var(--gray-30); }
.section-title + .section-subtitle { margin-top: 0; }

/* --- Two-column layout --- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }

/* --- Metrics strip --- */
.metrics-strip {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px;
  text-align: center; padding: 48px 0;
}
.metric-item .metric-value {
  font-size: 2.25rem; font-weight: 700; color: var(--blue-60);
}
.metric-item .metric-label {
  font-size: 0.9375rem; color: var(--gray-70); margin-top: 4px;
}

/* --- Cards --- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--white); border: 1px solid var(--gray-20); border-radius: 8px;
  padding: 32px 24px; transition: box-shadow 0.2s, border-color 0.2s;
}
.card:hover { border-color: var(--blue-40); box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
.card-icon {
  width: 48px; height: 48px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-10); color: var(--blue-60); margin-bottom: 16px;
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 8px; }
.card p { font-size: 1rem; color: var(--gray-80); line-height: 1.6; }

/* --- Steps --- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; counter-reset: step; }
.step { position: relative; padding-left: 0; text-align: center; }
.step-number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--blue-60); color: var(--white);
  font-size: 1.25rem; font-weight: 700; margin-bottom: 16px;
}
.step h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 8px; }
.step p { font-size: 1rem; color: var(--gray-70); line-height: 1.6; }

/* --- Tech list --- */
.tech-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.tech-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px; border-radius: 6px; background: rgba(255,255,255,0.05);
}
.section-dark .tech-item { border: 1px solid var(--gray-80); }
.tech-item svg { width: 20px; height: 20px; color: var(--teal-40); flex-shrink: 0; margin-top: 2px; }
.tech-item strong { display: block; font-size: 1rem; font-weight: 600; }
.tech-item span { font-size: 0.9375rem; color: var(--gray-70); }

/* --- Partnership banner --- */
.partnership-banner {
  display: flex; align-items: center; gap: 40px; padding: 40px;
  background: #ffffff; border-radius: 12px; border: 1px solid var(--gray-20);
}
.partnership-banner img { width: 260px; flex-shrink: 0; }
.partnership-banner h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 8px; }
.partnership-banner p { font-size: 1rem; color: var(--gray-80); }

/* --- Pricing table --- */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pricing-card {
  background: var(--white); border: 2px solid var(--gray-20); border-radius: 12px;
  padding: 36px 28px; position: relative;
}
.pricing-card.featured { border-color: var(--blue-60); }
.pricing-card.featured::before {
  content: 'Most Popular'; position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--blue-60); color: var(--white); font-size: 0.75rem; font-weight: 600;
  padding: 4px 16px; border-radius: 12px;
}
.pricing-tier { font-size: 1.125rem; font-weight: 600; color: var(--gray-100); }
.pricing-price { font-size: 2.5rem; font-weight: 700; color: var(--gray-100); margin: 16px 0 4px; }
.pricing-price span { font-size: 1rem; font-weight: 400; color: var(--gray-60); }
.pricing-desc { font-size: 0.875rem; color: var(--gray-60); margin-bottom: 24px; }
.pricing-features { list-style: none; margin-bottom: 28px; }
.pricing-features li {
  padding: 8px 0; font-size: 0.9375rem; color: var(--gray-80);
  border-bottom: 1px solid var(--gray-10); display: flex; align-items: center; gap: 8px;
}
.pricing-features li svg { width: 16px; height: 16px; color: var(--teal-60); flex-shrink: 0; }
.pricing-card .btn { width: 100%; }

/* --- Agent cards (product page) --- */
.agent-card {
  background: var(--white); border: 1px solid var(--gray-20); border-radius: 8px;
  padding: 28px 24px;
}
.agent-card h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 6px; }
.agent-card .agent-desc { font-size: 1rem; color: var(--gray-80); margin-bottom: 12px; }
.agent-card .agent-example {
  font-family: var(--font-mono); font-size: 0.8125rem; color: var(--teal-60);
  background: var(--gray-10); padding: 8px 12px; border-radius: 4px;
  border-left: 3px solid var(--teal-50);
}

/* --- Platform coverage --- */
.check-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; font-size: 1rem; color: var(--gray-90);
}
.check-list li svg { width: 20px; height: 20px; color: var(--teal-60); flex-shrink: 0; }

/* --- Architecture diagram (styled HTML) --- */
.arch-flow {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  justify-content: center; padding: 32px 0;
}
.arch-box {
  padding: 12px 20px; border-radius: 6px; font-size: 0.8125rem; font-weight: 600;
  text-align: center; min-width: 120px;
}
.arch-box.user { background: var(--gray-10); color: var(--gray-90); border: 1px solid var(--gray-20); }
.arch-box.orchestrate { background: var(--blue-10); color: var(--blue-70); border: 1px solid var(--blue-20); }
.arch-box.copilot { background: var(--blue-60); color: var(--white); }
.arch-box.agents { background: var(--teal-60); color: var(--white); }
.arch-box.clusters { background: var(--gray-90); color: var(--white); }
.arch-arrow { font-size: 1.25rem; color: var(--gray-50); }

/* --- Security list --- */
.security-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.security-item {
  display: flex; align-items: flex-start; gap: 12px; padding: 16px;
  background: var(--gray-10); border-radius: 6px;
}
.security-item svg { width: 20px; height: 20px; color: var(--blue-60); flex-shrink: 0; margin-top: 2px; }
.security-item strong { font-size: 1rem; display: block; }
.security-item span { font-size: 0.9375rem; color: var(--gray-70); }

/* --- Contact form --- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-size: 0.875rem; font-weight: 500;
  color: var(--gray-80); margin-bottom: 6px;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 14px; font-size: 0.9375rem;
  font-family: var(--font-sans); border: 1px solid var(--gray-30);
  border-radius: 4px; background: var(--white); color: var(--gray-90);
  transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--blue-60); box-shadow: 0 0 0 2px var(--blue-20);
}
.form-group textarea { min-height: 120px; resize: vertical; }

/* --- Contact info sidebar --- */
.contact-info h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 20px; }
.contact-info-item {
  display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px;
}
.contact-info-item svg { width: 20px; height: 20px; color: var(--blue-60); flex-shrink: 0; margin-top: 2px; }
.contact-info-item strong { display: block; font-size: 0.875rem; }
.contact-info-item span, .contact-info-item a { font-size: 0.875rem; color: var(--gray-60); }

/* --- Pathway cards (contact page) --- */
.pathway-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 48px; }
.pathway-card {
  padding: 32px 28px; border: 2px solid var(--gray-20); border-radius: 12px;
  transition: border-color 0.2s;
}
.pathway-card:hover { border-color: var(--blue-40); }
.pathway-card h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 8px; }
.pathway-card p { font-size: 1rem; color: var(--gray-80); margin-bottom: 20px; }

/* --- About page --- */
.about-values { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.about-value { padding: 24px; border-left: 3px solid var(--blue-60); }
.about-value h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 6px; }
.about-value p { font-size: 1rem; color: var(--gray-80); }

.roadmap-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; font-size: 0.9375rem; color: var(--gray-70);
}
.roadmap-list .badge-planned {
  font-size: 0.6875rem; font-weight: 600; padding: 2px 10px; border-radius: 10px;
  background: var(--blue-10); color: var(--blue-70); flex-shrink: 0;
}

/* --- Footer --- */
.site-footer { background: var(--gray-100); color: var(--gray-30); padding: 56px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand p { font-size: 0.8125rem; color: var(--gray-50); margin-top: 12px; line-height: 1.5; }
.footer-col h4 { font-size: 0.8125rem; font-weight: 600; color: var(--white); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-col a { display: block; font-size: 0.8125rem; color: var(--gray-50); padding: 4px 0; text-decoration: none; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid var(--gray-80); padding-top: 24px;
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 16px;
}
.footer-bottom p { font-size: 0.75rem; color: var(--gray-60); }
.footer-social { display: flex; gap: 16px; }
.footer-social a { color: var(--gray-50); }
.footer-social a:hover { color: var(--white); }
.footer-social svg { width: 20px; height: 20px; }

/* --- Chat widget --- */
.chat-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 200;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--blue-60); color: var(--white);
  border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2); transition: transform 0.2s, background 0.2s;
}
.chat-fab:hover { transform: scale(1.05); background: var(--blue-70); }
.chat-fab.hidden { display: none; }
.chat-fab svg { width: 28px; height: 28px; }

.chat-panel {
  position: fixed; bottom: 24px; right: 24px; z-index: 201;
  width: 380px; max-height: 520px; border-radius: 12px;
  background: var(--white); box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  display: none; flex-direction: column; overflow: hidden;
}
.chat-panel.open { display: flex; }
.chat-header {
  background: var(--blue-90); color: var(--white); padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.chat-header-left { display: flex; align-items: center; gap: 10px; }
.chat-header-left img { width: 28px; height: 28px; border-radius: 6px; }
.chat-header h4 { font-size: 0.875rem; font-weight: 600; }
.chat-header .badge-preview {
  font-size: 0.625rem; font-weight: 600; padding: 2px 8px; border-radius: 8px;
  background: rgba(255,255,255,0.2); color: var(--white); margin-left: 8px;
}
.chat-close {
  background: none; border: none; color: var(--white); cursor: pointer;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
}
.chat-close svg { width: 18px; height: 18px; }
.chat-body { flex: 1; padding: 16px; overflow-y: auto; min-height: 260px; }
.chat-msg {
  padding: 10px 14px; border-radius: 12px; font-size: 0.8125rem;
  line-height: 1.5; margin-bottom: 10px; max-width: 85%;
}
.chat-msg.bot { background: var(--gray-10); color: var(--gray-90); }
.chat-msg.user { background: var(--blue-60); color: var(--white); margin-left: auto; }
.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chat-chip {
  padding: 6px 12px; border: 1px solid var(--gray-30); border-radius: 16px;
  font-size: 0.75rem; color: var(--gray-70); cursor: pointer; background: var(--white);
  transition: border-color 0.15s, background 0.15s;
}
.chat-chip:hover { border-color: var(--blue-60); background: var(--blue-10); color: var(--blue-60); }
.chat-input-area {
  display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--gray-20);
}
.chat-input {
  flex: 1; padding: 8px 12px; border: 1px solid var(--gray-30); border-radius: 6px;
  font-size: 0.8125rem; font-family: var(--font-sans); outline: none;
}
.chat-input:focus { border-color: var(--blue-60); }
.chat-send {
  background: var(--blue-60); color: var(--white); border: none; border-radius: 6px;
  padding: 8px 14px; cursor: pointer; font-size: 0.8125rem; font-weight: 600;
}
.chat-send:hover { background: var(--blue-70); }

/* --- 404 --- */
.error-page {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: calc(100vh - var(--header-h) - 200px); text-align: center; padding: 48px 24px;
}
.error-page h1 { font-size: 6rem; font-weight: 700; color: var(--blue-60); }
.error-page h2 { font-size: 1.5rem; font-weight: 600; margin: 12px 0; }
.error-page p { font-size: 1rem; color: var(--gray-60); margin-bottom: 24px; }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .card-grid, .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .metrics-strip { grid-template-columns: repeat(3, 1fr); }
  .two-col { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-toggle { display: flex; }
  .hero h1 { font-size: 2rem; }
  .hero { padding: 56px 0 48px; }
  .section { padding: 48px 0; }
  .section-title { font-size: 1.5rem; }
  .card-grid, .pricing-grid, .steps { grid-template-columns: 1fr; }
  .metrics-strip { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .contact-grid { grid-template-columns: 1fr; }
  .pathway-grid { grid-template-columns: 1fr; }
  .tech-list, .security-grid, .about-values { grid-template-columns: 1fr; }
  .partnership-banner { flex-direction: column; text-align: center; }
  .arch-flow { flex-direction: column; }
  .arch-arrow { transform: rotate(90deg); }
  .chat-panel { width: calc(100vw - 16px); right: 8px; bottom: 8px; max-height: calc(100vh - 80px); }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.75rem; }
  .metrics-strip { grid-template-columns: 1fr 1fr; }
  .pricing-price { font-size: 2rem; }
}
