/* === Shared styles for Routtx landing pages === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent: #228be6;
  --accent-hover: #1c7ed6;
  --accent-light: #e7f5ff;
  --text: #212529;
  --text-secondary: #495057;
  --text-muted: #868e96;
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --border: #e9ecef;
  --success: #2b8a3e;
  --success-light: #ebfbee;
  --warning: #e67700;
  --warning-light: #fff9db;
  --danger: #c92a2a;
  --danger-light: #fff5f5;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, sans-serif;
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* === Nav === */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--accent); }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s;
  border: none;
  cursor: pointer;
}

.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }

.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text-secondary); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: 10px; }

/* === Page layout === */
.page {
  padding-top: 56px; /* account for fixed nav */
}

.page-header {
  padding: 60px 40px 40px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.page-header .eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.page-header h1 {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.1;
  margin-bottom: 16px;
}

.page-header p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
}

/* === Sections === */
section {
  padding: 60px 40px;
}

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

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-inner.narrow {
  max-width: 800px;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 12px;
  text-align: center;
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  text-align: center;
  max-width: 600px;
  margin: 0 auto 48px;
}

/* === Cards === */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transform: translateY(-2px);
}

.card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 22px;
  background: var(--accent-light);
}

/* === Code === */
code {
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
}

pre {
  background: #1a1b2e;
  color: #e9ecef;
  border-radius: 10px;
  padding: 20px 24px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  margin: 16px 0;
}

pre code { background: transparent; padding: 0; color: inherit; }

pre .comment { color: #868e96; }
pre .string { color: #8ce99a; }
pre .keyword { color: #b197fc; }
pre .func { color: #ffd43b; }
pre .var { color: #74c0fc; }

/* === Footer === */
footer {
  padding: 48px 40px 32px;
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.footer-brand h3 {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
}

.footer-brand p {
  font-size: 13px;
  color: var(--text-muted);
}

.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 4px 0;
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  max-width: 1100px;
  margin: 24px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* === Article layout === */
.article {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 40px 80px;
}

.article-header { margin-bottom: 40px; }

.article-category {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 12px;
}

.article h1 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.2;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.article-meta strong { color: var(--text); font-weight: 600; }

.article-lead {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.article h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin: 40px 0 14px;
  line-height: 1.3;
}

.article h3 {
  font-size: 17px;
  font-weight: 700;
  margin: 28px 0 10px;
}

.article p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 16px;
}

.article ul, .article ol {
  margin: 12px 0 18px 20px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
}

.article li { margin-bottom: 6px; }

.article blockquote {
  border-left: 3px solid var(--accent);
  background: var(--bg-alt);
  padding: 14px 20px;
  margin: 20px 0;
  font-style: italic;
  color: var(--text-secondary);
  border-radius: 0 8px 8px 0;
}

.article a { color: var(--accent); text-decoration: underline; }
.article a.btn { text-decoration: none; }
.article a.btn-primary, .article a.btn-primary:hover { color: white; }

.article pre { font-size: 13px; margin: 20px 0; }

.callout {
  background: var(--accent-light);
  border: 1px solid #a5d8ff;
  border-radius: 10px;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 14px;
  color: #1971c2;
}

.callout.warning { background: var(--warning-light); border-color: #ffd43b; color: #856400; }
.callout.success { background: var(--success-light); border-color: #b2f2bb; color: var(--success); }

.article-cta {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 32px 0;
  text-align: center;
}

.article-cta h3 { font-size: 18px; margin-bottom: 8px; }
.article-cta p { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; }

.table-simple {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.table-simple th {
  background: var(--bg-alt);
  padding: 10px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1px solid var(--border);
}

.table-simple td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.table-simple tr:last-child td { border-bottom: none; }

/* === Responsive === */
@media (max-width: 768px) {
  nav { padding: 0 20px; }
  .nav-links a { display: none; }
  .nav-links a.btn { display: inline-flex; }
  section, .page-header { padding-left: 20px; padding-right: 20px; }
  .page-header h1 { font-size: 32px; }
  .article { padding: 20px; }
  .article h1 { font-size: 28px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
