/* SchemaShift - Shared Styles */

:root {
  --bg: #0a0a0b;
  --surface: #141416;
  --surface-2: #1c1c1f;
  --border: #27272a;
  --text: #fafafa;
  --muted: #a1a1aa;
  --accent: #3b82f6;
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
  --purple: #a855f7;
  --orange: #f97316;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ─── Layout ─── */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Docs layout */
.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    display: none;
  }
}

/* ─── Header ─── */

header {
  text-align: center;
  padding: 4rem 0 3rem;
}

.logo {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.logo span {
  color: var(--accent);
}

.tagline {
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.install-cmd {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.5rem;
  font-family: "SF Mono", Monaco, monospace;
  font-size: 0.95rem;
  display: inline-block;
  color: var(--green);
}
.install-cmd::before {
  content: "$ ";
  color: var(--muted);
}

/* ─── Sidebar (docs) ─── */

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 2rem 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-logo {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 2rem;
}
.sidebar-logo span {
  color: var(--accent);
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.sidebar a {
  color: var(--muted);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
}
.sidebar a:hover {
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}
.sidebar-section {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 1.5rem 0 0.5rem 0.75rem;
}

/* Content area (docs) */
.content {
  padding: 3rem 4rem;
  max-width: 900px;
}
@media (max-width: 900px) {
  .content {
    padding: 2rem;
  }
}

/* Mobile nav (docs) */
.mobile-nav {
  display: none;
  padding: 1rem 2rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
@media (max-width: 900px) {
  .mobile-nav {
    display: block;
  }
}

/* ─── Typography ─── */

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}
h2 {
  font-size: 1.5rem;
  margin: 3rem 0 1rem;
  padding-top: 1rem;
}
h3 {
  font-size: 1.15rem;
  margin: 2rem 0 0.75rem;
  color: var(--muted);
}
p {
  margin-bottom: 1rem;
}

/* ─── Code ─── */

code {
  font-family: "SF Mono", Monaco, "Courier New", monospace;
  font-size: 0.875em;
  background: var(--surface);
  padding: 0.2em 0.4em;
  border-radius: 4px;
}
pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
}
pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
  line-height: 1.6;
}
.cmd {
  color: var(--green);
}
.flag {
  color: var(--yellow);
}
.comment {
  color: var(--muted);
}
.string {
  color: var(--accent);
}

/* ─── Tables ─── */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.9rem;
}
th,
td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  background: var(--surface);
  font-weight: 600;
  color: var(--muted);
}

/* ─── Lists ─── */

ul,
ol {
  margin: 0.5rem 0 1.5rem 1.5rem;
}
li {
  margin: 0.5rem 0;
}

/* ─── Callouts ─── */

.callout {
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  border-left: 4px solid;
}
.callout-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--accent);
}
.callout-warning {
  background: rgba(234, 179, 8, 0.1);
  border-color: var(--yellow);
}
.callout-success {
  background: rgba(34, 197, 94, 0.1);
  border-color: var(--green);
}
.callout-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.callout p {
  margin: 0;
  font-size: 0.9rem;
}

/* ─── Cards ─── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
}
.card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 30px rgba(59, 130, 246, 0.15);
}
.card-badge {
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  width: fit-content;
  margin-bottom: 1rem;
}
.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

/* ─── Pricing ─── */

.pricing-section {
  padding: 3rem 0;
}
.pricing-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.pricing-subtitle {
  text-align: center;
  color: var(--muted);
  margin-bottom: 3rem;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}
.price {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.price-note {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}
.features {
  list-style: none;
  flex-grow: 1;
  margin-bottom: 1.5rem;
  margin-left: 0;
}
.features li {
  padding: 0.5rem 0;
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.features li::before {
  content: "\2713";
  color: var(--green);
  font-weight: bold;
}
.features li.disabled::before {
  content: "\2014";
  color: var(--border);
}

/* ─── Buttons ─── */

.btn {
  display: block;
  width: 100%;
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}
.btn:hover {
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover {
  background: #2563eb;
}
.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-secondary:hover {
  border-color: var(--muted);
}
.btn-inline {
  display: inline-block;
  width: auto;
}

/* ─── Migrations table ─── */

.migrations-section {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}
.migrations-section h2 {
  text-align: center;
  margin-bottom: 2rem;
}
.migrations-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.migrations-table th,
.migrations-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.migrations-table th {
  color: var(--muted);
  font-weight: 500;
}
.migrations-table th:not(:first-child),
.migrations-table td:not(:first-child) {
  text-align: center;
}
.check {
  color: var(--green);
}
.cross {
  color: var(--border);
}

/* ─── Migration Guide Pages ─── */

.breadcrumb {
  padding: 1rem 0;
  font-size: 0.875rem;
  color: var(--muted);
}
.breadcrumb a {
  color: var(--muted);
}
.breadcrumb a:hover {
  color: var(--accent);
}
.breadcrumb span {
  margin: 0 0.5rem;
}

.guide-header {
  padding: 3rem 0 2rem;
}
.guide-header h1 {
  font-size: 2.25rem;
  border: none;
  padding: 0;
  margin-bottom: 1rem;
}
.guide-header p {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 700px;
}

.code-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}
@media (max-width: 768px) {
  .code-comparison {
    grid-template-columns: 1fr;
  }
}
.code-comparison .code-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.code-block-header {
  background: var(--surface-2);
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.code-block pre {
  margin: 0;
  border: none;
  border-radius: 0;
}

.conversion-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 2rem;
  font-size: 0.875rem;
}
.conversion-table th {
  background: var(--surface);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.conversion-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.conversion-table code {
  font-size: 0.8rem;
}

.gotcha-list {
  list-style: none;
  margin-left: 0;
}
.gotcha-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.gotcha-list li strong {
  color: var(--yellow);
}

.checklist {
  list-style: none;
  margin-left: 0;
}
.checklist li {
  padding: 0.5rem 0;
  padding-left: 1.75rem;
  position: relative;
}
.checklist li::before {
  content: "\25A1";
  position: absolute;
  left: 0;
  color: var(--muted);
}

.faq-section {
  margin: 2rem 0;
}
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}
.faq-item h3 {
  color: var(--text);
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}
.faq-item p {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}

.related-guides {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.related-guides a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  transition: border-color 0.2s;
}
.related-guides a:hover {
  border-color: var(--accent);
  text-decoration: none;
}
.related-guides a strong {
  display: block;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.related-guides a span {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Guide grid on homepage */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.guides-grid a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  transition: border-color 0.2s;
}
.guides-grid a:hover {
  border-color: var(--accent);
  text-decoration: none;
}
.guides-grid a strong {
  display: block;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.guides-grid a span {
  font-size: 0.85rem;
  color: var(--muted);
}

/* ─── Footer ─── */

footer {
  text-align: center;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
}
footer a {
  color: var(--accent);
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}

/* ─── Feature matrix (comparison page) ─── */

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.875rem;
}
.matrix-table th {
  background: var(--surface);
  padding: 0.75rem 0.5rem;
  text-align: center;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid var(--border);
}
.matrix-table th:first-child {
  text-align: left;
  padding-left: 1rem;
}
.matrix-table td {
  padding: 0.75rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.matrix-table td:first-child {
  text-align: left;
  padding-left: 1rem;
  font-weight: 500;
}

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

.hero {
  text-align: center;
  padding: 5rem 0 2rem;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(59, 130, 246, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero > * {
  position: relative;
  z-index: 1;
}
.hero-badge {
  display: inline-block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
}
.hero-title {
  font-size: 3.25rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  border: none;
  padding: 0;
  letter-spacing: -0.02em;
}
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.25rem;
  }
}
.hero-subtitle {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}
.hero-actions {
  margin-bottom: 1.25rem;
}
.hero-links {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Demo Section (Before/After) ─── */

.demo-section {
  padding: 2rem 0 3rem;
}
.demo-caption {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 1rem;
}

/* ─── Library Strip ─── */

.library-strip {
  text-align: center;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--border);
}
.library-strip-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 1rem;
}
.library-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}
.lib-tag {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

/* ─── How It Works Steps ─── */

.steps-section {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}
.steps-section h2 {
  text-align: center;
  margin-bottom: 2.5rem;
}
.steps-grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 1rem;
}
@media (max-width: 768px) {
  .steps-grid {
    flex-direction: column;
    align-items: center;
  }
  .step-arrow {
    transform: rotate(90deg);
  }
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  max-width: 300px;
  text-align: center;
  flex: 1;
}
.step-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.step h3 {
  color: var(--text);
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}
.step p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.step-cmd {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-family: "SF Mono", Monaco, monospace;
  font-size: 0.75rem;
  color: var(--green);
  white-space: nowrap;
  overflow-x: auto;
}
.step-arrow {
  color: var(--border);
  font-size: 2rem;
  margin-top: 3.5rem;
  flex-shrink: 0;
}

/* ─── Key Features Grid ─── */

.features-section {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}
.features-section h2 {
  text-align: center;
  margin-bottom: 2.5rem;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
}
.feature-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}
.feature-card h3 {
  color: var(--text);
  font-size: 1.05rem;
  margin: 0 0 0.5rem;
}
.feature-card p {
  color: var(--muted);
  font-size: 0.875rem;
  margin: 0;
  line-height: 1.6;
}

/* ─── Terminal Demo ─── */

.terminal-section {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}
.terminal-section h2 {
  text-align: center;
  margin-bottom: 2rem;
}
.terminal {
  max-width: 720px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.terminal-bar {
  background: var(--surface-2);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }
.terminal-title {
  color: var(--muted);
  font-size: 0.8rem;
  margin-left: auto;
  margin-right: auto;
}
.terminal-body {
  background: var(--bg);
  margin: 0;
  border: none;
  border-radius: 0;
  padding: 1.5rem;
  font-size: 0.85rem;
  line-height: 1.6;
}
.terminal-body code {
  background: none;
  padding: 0;
}
.green-text { color: var(--green); }
.red-text { color: var(--red); }
.muted { color: var(--muted); }

/* ─── Advanced Features (Condensed) ─── */

.advanced-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}
@media (max-width: 768px) {
  .advanced-grid {
    grid-template-columns: 1fr;
  }
}
.advanced-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
}
.advanced-group-title {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 1rem;
}
.advanced-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.advanced-list li {
  padding: 0.4rem 0;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}
.advanced-list li strong {
  color: var(--text);
  font-weight: 600;
}
