/* ============================================================
   Samarkand Industries — shared subpage styles
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #ffffff;
  --bg-alt: #f6f6f4;
  --bg-dark: #0d0d0c;
  --text: #111110;
  --text-mid: #4b4b48;
  --text-muted: #9a9a96;
  --text-faint: #d0d0cc;
  --accent: #1e40ff;
  --accent-mid: #3358ff;
  --accent-light: #eef1ff;
  --accent-dark: #1030cc;
  --border: #e8e8e4;
  --border-mid: #d4d4cf;
  --radius: 8px;
  --radius-lg: 16px;
  --radius-xl: 22px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── SVG ICON SYSTEM ── */
.icon {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 20px; height: 20px; }
.icon-lg { width: 24px; height: 24px; }

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 60px;
  height: 64px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
nav.scrolled { border-bottom-color: var(--border); }

.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-mark { width: 38px; height: 38px; flex-shrink: 0; }
.nav-wordmark { display: flex; flex-direction: column; gap: 1px; line-height: 1; }
.nav-wordmark-primary {
  font-family: 'Urbanist', sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1;
}
.nav-wordmark-secondary {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1;
}
.nav-links { display: flex; align-items: center; gap: 36px; list-style: none; }
.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

.nav-end { display: flex; align-items: center; gap: 12px; }
.btn-ghost-sm {
  font-size: 14px;
  color: var(--text-mid);
  text-decoration: none;
  font-weight: 400;
  transition: color 0.2s;
}
.btn-ghost-sm:hover { color: var(--text); }
.btn-solid-sm {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  background: var(--text);
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-solid-sm:hover { background: #2a2a28; transform: translateY(-1px); }

/* ── DOC HEAD ── */
.doc-head {
  padding: 140px 60px 64px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}
.doc-head-inner {
  max-width: 860px;
  margin: 0 auto;
}
.doc-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.doc-title {
  font-family: 'Urbanist', sans-serif;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 18px;
}
.doc-title em { font-style: italic; font-weight: 300; color: var(--text-muted); }
.doc-sub {
  font-size: 17px;
  color: var(--text-mid);
  max-width: 680px;
  line-height: 1.65;
  margin-bottom: 28px;
}
.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}
.doc-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'DM Mono', monospace;
  font-weight: 300;
}
.doc-meta-item strong {
  font-weight: 500;
  color: var(--text-mid);
}

/* ── ARTICLE LAYOUT ── */
.doc-body {
  padding: 72px 60px 140px;
}
.doc-body-inner {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 72px;
  max-width: 1140px;
  margin: 0 auto;
  align-items: start;
}
.doc-toc {
  position: sticky;
  top: 96px;
  align-self: start;
}
.doc-toc-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 16px;
}
.doc-toc-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.doc-toc-list a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  line-height: 1.5;
  transition: color 0.2s;
  border-left: 2px solid var(--border);
  padding-left: 12px;
  display: block;
}
.doc-toc-list a:hover { color: var(--text); border-left-color: var(--text-mid); }
.doc-toc-list a.active { color: var(--accent); border-left-color: var(--accent); }

.doc-article { min-width: 0; }
.doc-article h2 {
  font-family: 'Urbanist', sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--text);
  margin-top: 52px;
  margin-bottom: 14px;
  scroll-margin-top: 92px;
}
.doc-article h2:first-child { margin-top: 0; }
.doc-article h3 {
  font-family: 'Urbanist', sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-top: 32px;
  margin-bottom: 8px;
}
.doc-article p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-mid);
  margin-bottom: 14px;
}
.doc-article p strong { color: var(--text); font-weight: 500; }
.doc-article a:not(.btn):not(.chip-link) {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(30,64,255,0.25);
  transition: border-color 0.2s;
}
.doc-article a:not(.btn):not(.chip-link):hover { border-bottom-color: var(--accent); }
.doc-article ul, .doc-article ol {
  padding-left: 22px;
  color: var(--text-mid);
  margin-bottom: 14px;
}
.doc-article li { margin-bottom: 6px; line-height: 1.7; font-size: 15px; }
.doc-article li strong { color: var(--text); font-weight: 500; }
.doc-article hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 48px 0;
}

/* Callout */
.callout {
  background: var(--accent-light);
  border: 1px solid rgba(30,64,255,0.18);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  margin: 22px 0;
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.7;
}
.callout strong { color: var(--accent-dark); font-weight: 600; }
.callout-warn {
  background: #fdf5e8;
  border-color: rgba(184,136,32,0.18);
  border-left-color: #b88820;
}
.callout-warn strong { color: #9a6010; }

/* Data table */
.doc-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 24px;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.doc-article table th {
  background: var(--bg-alt);
  color: var(--text);
  font-weight: 600;
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--border);
}
.doc-article table td {
  padding: 12px 16px;
  color: var(--text-mid);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.6;
}
.doc-article table tr:last-child td { border-bottom: none; }

/* Sitemap specific */
.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 8px;
}
.sitemap-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.sitemap-card-title {
  font-family: 'Urbanist', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 14px;
}
.sitemap-card ul { list-style: none; padding: 0; }
.sitemap-card li { margin-bottom: 8px; font-size: 14px; }
.sitemap-card li a {
  color: var(--text-mid);
  text-decoration: none;
  border-bottom: none;
  transition: color 0.2s;
}
.sitemap-card li a:hover { color: var(--accent); }
.sitemap-card li .url {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: var(--text-faint);
  display: block;
  margin-top: 1px;
}

/* ── FOOTER ── */
footer {
  background: var(--bg-dark);
  padding: 80px 60px 48px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 64px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 40px;
}
.footer-logo {
  font-family: 'Urbanist', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.03em;
  color: white;
  margin-bottom: 12px;
}
.footer-tagline { font-size: 13px; color: rgba(255,255,255,0.3); line-height: 1.7; max-width: 240px; margin-bottom: 24px; }
.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 6px 14px;
  border-radius: 999px;
}
.footer-col-title { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.25); margin-bottom: 18px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-links a { font-size: 13px; color: rgba(255,255,255,0.45); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: rgba(255,255,255,0.8); }
.footer-bottom { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 20px; }
.footer-legal { font-size: 11px; color: rgba(255,255,255,0.2); line-height: 1.9; }
.footer-legal strong { color: rgba(255,255,255,0.35); font-weight: 500; }
.footer-legal-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-legal-links a { font-size: 11px; color: rgba(255,255,255,0.25); text-decoration: none; transition: color 0.2s; }
.footer-legal-links a:hover { color: rgba(255,255,255,0.5); }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  nav { padding: 0 24px; }
  .nav-links { display: none; }
  .doc-head { padding: 110px 24px 48px; }
  .doc-body { padding: 48px 24px 80px; }
  .doc-body-inner { grid-template-columns: 1fr; gap: 40px; }
  .doc-toc { position: static; order: -1; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
  .doc-toc-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  footer { padding: 60px 24px 40px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; }
  .doc-toc-list { grid-template-columns: 1fr; }
}
