/* ────────────────────────────────────────
   Seller Ops Copilot – Documentation Site
   Square-inspired clean design
   ──────────────────────────────────────── */

:root {
  --ink: #1a1a2e;
  --ink-light: #3d3d5c;
  --ink-muted: #6b7280;
  --surface: #ffffff;
  --surface-alt: #f8f9fb;
  --surface-dark: #0f1629;
  --surface-dark-alt: #161b33;
  --primary: #006aff;
  --primary-dark: #0051cc;
  --primary-light: #e8f0ff;
  --accent-green: #00d632;
  --accent-amber: #f59e0b;
  --accent-rose: #ef4444;
  --border: #e5e7eb;
  --border-dark: #2a2f4a;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.08), 0 4px 10px rgba(0,0,0,.04);
  --max-w: 1120px;
  --transition: .2s ease;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

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

img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Typography ──────────────────────── */

h1, h2, h3, h4 { font-weight: 700; line-height: 1.25; }
h1 { font-size: 3rem; letter-spacing: -.03em; }
h2 { font-size: 2rem; letter-spacing: -.02em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

@media (max-width: 640px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
}

.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: .75rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--ink-muted);
  max-width: 640px;
  margin-top: .75rem;
}

/* ─── Navigation ──────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 56px;
}

.nav-logo {
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.nav-logo:hover { text-decoration: none; }

.nav-links {
  display: flex;
  gap: .25rem;
  list-style: none;
  overflow-x: auto;
}

.nav-links a {
  font-size: .8rem;
  font-weight: 500;
  color: var(--ink-muted);
  padding: .4rem .75rem;
  border-radius: 6px;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--ink);
  background: var(--surface-alt);
  text-decoration: none;
}

.nav-links a.active {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-cta {
  font-size: .8rem;
  font-weight: 600;
  color: var(--surface) !important;
  background: var(--ink);
  padding: .45rem 1rem;
  border-radius: 6px;
  transition: var(--transition);
}

.nav-cta:hover {
  background: var(--ink-light);
  text-decoration: none !important;
}

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
}

.nav-mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  margin: 4px 0;
  transition: var(--transition);
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: .75rem 1.5rem;
    gap: .25rem;
  }
}

/* ─── Sections ────────────────────────── */

section {
  padding: 5rem 1.5rem;
}

section:nth-child(even) {
  background: var(--surface-alt);
}

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

/* ─── Hero ────────────────────────────── */

.hero {
  background: var(--surface);
  color: var(--ink);
  padding: 6rem 1.5rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: -20%;
  width: 140%;
  height: 180%;
  background: radial-gradient(circle at 20% 50%, rgba(0,106,255,.06) 0%, transparent 50%),
              radial-gradient(circle at 80% 50%, rgba(99,102,241,.05) 0%, transparent 50%);
  pointer-events: none;
}

.hero > * { position: relative; z-index: 1; }

.hero h1 {
  font-size: 3.25rem;
  max-width: 800px;
  margin: 0 auto;
  color: #000;
}

.hero .subtitle {
  font-size: 1.2rem;
  color: #000;
  max-width: 600px;
  margin: 1.25rem auto 0;
  line-height: 1.6;
}

.hero-badges {
  display: flex;
  gap: .5rem;
  justify-content: center;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.hero-badge {
  font-size: .75rem;
  font-weight: 600;
  padding: .35rem .85rem;
  border-radius: 50px;
  border: 1px solid var(--border);
  color: #000;
  background: var(--surface-alt);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .9rem;
  font-weight: 600;
  padding: .7rem 1.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-outline {
  background: transparent;
  color: #000;
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--surface-alt);
  border-color: #d1d5db;
}

/* ─── Stat Bar ────────────────────────── */

.stat-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 2rem 1.5rem;
}

.stat-bar .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.stat-item .stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
}

.stat-item .stat-desc {
  font-size: .8rem;
  color: var(--ink-muted);
  margin-top: .25rem;
}

@media (max-width: 640px) {
  .stat-bar .container { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Card Grids ──────────────────────── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.card-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 860px) {
  .card-grid-3 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: #d1d5db;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.card-icon.blue   { background: #e8f0ff; color: var(--primary); }
.card-icon.green  { background: #e6fbe9; color: #00a825; }
.card-icon.amber  { background: #fef3c7; color: #b45309; }
.card-icon.purple { background: #ede9fe; color: #7c3aed; }
.card-icon.rose   { background: #ffe4e6; color: #dc2626; }
.card-icon.teal   { background: #e0fdf4; color: #0d9488; }

.card h3 { margin-bottom: .5rem; }

.card p {
  font-size: .9rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

/* ─── Architecture ────────────────────── */

.arch-diagram {
  background: var(--surface-dark);
  border-radius: var(--radius);
  padding: 2rem;
  margin-top: 2rem;
  overflow-x: auto;
}

.arch-diagram pre {
  color: #a5b4d4;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: .8rem;
  line-height: 1.7;
  white-space: pre;
}

/* ─── Tech Stack Table ────────────────── */

.tech-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  font-size: .9rem;
}

.tech-table th,
.tech-table td {
  text-align: left;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.tech-table th {
  font-weight: 600;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-muted);
  background: var(--surface-alt);
}

.tech-table td { color: var(--ink-light); }
.tech-table code {
  font-size: .8rem;
  background: var(--surface-alt);
  padding: .15rem .4rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* ─── Roadmap ─────────────────────────── */

.roadmap {
  position: relative;
  margin-top: 2.5rem;
}

.roadmap-phase {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem 0;
  position: relative;
}

.roadmap-phase:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 19px;
  top: 52px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.roadmap-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.roadmap-dot.active { background: var(--primary); color: #fff; }
.roadmap-dot.upcoming { background: var(--surface-alt); color: var(--ink-muted); border: 2px solid var(--border); }

.roadmap-content h3 { margin-bottom: .35rem; }
.roadmap-content p {
  font-size: .9rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

.roadmap-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .75rem;
}

.roadmap-tag {
  font-size: .7rem;
  font-weight: 600;
  padding: .2rem .6rem;
  border-radius: 4px;
  background: var(--surface-alt);
  color: var(--ink-muted);
  border: 1px solid var(--border);
}

.roadmap-tag.shipped { background: #e6fbe9; color: #00a825; border-color: #bbf7d0; }

/* ─── Code Blocks ─────────────────────── */

.code-block {
  background: var(--surface-dark);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin-top: 1.25rem;
}

.code-block code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: .8rem;
  color: #c9d4e8;
  line-height: 1.7;
}

.code-block .kw { color: #c792ea; }
.code-block .str { color: #c3e88d; }
.code-block .fn { color: #82aaff; }
.code-block .cm { color: #546e7a; }
.code-block .ty { color: #ffcb6b; }
.code-block .num { color: #f78c6c; }

/* ─── Key-Value Grid ──────────────────── */

.kv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

@media (max-width: 640px) {
  .kv-grid { grid-template-columns: 1fr; }
}

.kv-item {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.kv-item dt {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-muted);
  margin-bottom: .35rem;
}

.kv-item dd {
  font-size: .95rem;
  color: var(--ink);
  font-weight: 500;
}

/* ─── Callout ─────────────────────────── */

.callout {
  background: var(--primary-light);
  border: 1px solid #b6d4ff;
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.callout-icon { font-size: 1.5rem; flex-shrink: 0; }

.callout p {
  font-size: .9rem;
  color: var(--ink-light);
  line-height: 1.6;
}

/* ─── Two-Column ──────────────────────── */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  margin-top: 2.5rem;
}

@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
}

/* ─── Market Section ──────────────────── */

.market-stat {
  text-align: center;
  padding: 1.5rem;
}

.market-stat .big {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.market-stat .label {
  font-size: .85rem;
  color: var(--ink-muted);
  margin-top: .5rem;
}

/* ─── Getting Started ─────────────────── */

.steps {
  counter-reset: step;
  margin-top: 2rem;
}

.step {
  display: flex;
  gap: 1.25rem;
  padding: 1.25rem 0;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  flex-shrink: 0;
}

.step-content h4 { margin-bottom: .25rem; }
.step-content p {
  font-size: .9rem;
  color: var(--ink-muted);
}

.step-content code {
  font-size: .8rem;
  background: var(--surface-dark);
  color: #c9d4e8;
  padding: .5rem .75rem;
  border-radius: 6px;
  display: block;
  margin-top: .5rem;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ─── Footer ──────────────────────────── */

.footer {
  background: var(--surface-dark);
  color: #a5b4d4;
  padding: 3rem 1.5rem;
  text-align: center;
  font-size: .85rem;
}

.footer a { color: #8bb4ff; }

.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1rem;
  flex-wrap: wrap;
}

/* ─── Utility ─────────────────────────── */

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.text-center { text-align: center; }
.text-muted { color: var(--ink-muted); }
.text-small { font-size: .85rem; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}
