/* ============================================================
   Basis Website — Custom styles (on top of Tailwind CDN)
   ============================================================ */

/* ── Fonts ──────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── Scroll-reveal ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: none;
}

/* ── Gradient heading ───────────────────────────────────── */
.text-gradient {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 50%, #10B981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Hero glow ──────────────────────────────────────────── */
.hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -10%,
    rgba(79, 70, 229, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Feature card hover ─────────────────────────────────── */
.feat-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.feat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -10px rgba(79, 70, 229, 0.15);
}

/* ── Edition card highlight ─────────────────────────────── */
.edition-popular {
  box-shadow: 0 0 0 2px #4F46E5, 0 24px 48px -12px rgba(79, 70, 229, 0.3);
}

/* ── Tab active ─────────────────────────────────────────── */
.tab-active {
  background: #4F46E5;
  color: #fff !important;
}

/* ── Screenshot frame ───────────────────────────────────── */
.screenshot-frame {
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 32px 64px -16px rgba(0,0,0,0.18);
}

/* ── Checkmark list ─────────────────────────────────────── */
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 4px 0;
}
.check-list li::before {
  content: '';
  flex-shrink: 0;
  width: 18px; height: 18px;
  margin-top: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2310B981'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ── Docs sidebar ───────────────────────────────────────── */
.docs-sidebar a.active {
  color: #4F46E5;
  background: rgba(79, 70, 229, 0.08);
  border-radius: 6px;
}

/* ── Code block ─────────────────────────────────────────── */
pre, code {
  font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  font-size: 0.875rem;
}
pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 1.25rem 1.5rem;
  border-radius: 10px;
  overflow-x: auto;
}

/* ── Prose (docs) ───────────────────────────────────────── */
.prose h2 { font-size: 1.5rem; font-weight: 700; margin: 2rem 0 0.75rem; }
.prose h3 { font-size: 1.2rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }
.prose p  { line-height: 1.75; margin-bottom: 1rem; color: #374151; }
.prose ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.prose li { padding: 2px 0; color: #374151; }
.prose a  { color: #4F46E5; text-decoration: underline; }
.prose strong { font-weight: 600; }
.prose blockquote {
  border-left: 3px solid #4F46E5;
  padding: 0.5rem 1rem;
  background: rgba(79, 70, 229, 0.05);
  border-radius: 0 6px 6px 0;
  margin: 1.25rem 0;
}

/* ── SVG app mockup ─────────────────────────────────────── */
.app-mockup {
  display: block;
  width: 100%;
  background: #f8fafc;
}

/* ── Image placeholder ─────────────────────────────────── */
/* Replace with <img src="..." /> when screenshots are ready   */
.img-ph {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #94a3b8;
  font-size: 0.8125rem;
  font-family: ui-monospace, 'Cascadia Code', monospace;
  text-align: center;
  padding: 2rem 1.5rem;
  margin: 1.25rem 0;
  width: 100%;
}
.img-ph svg { opacity: 0.35; }

/* Hero/feature placeholder — larger, styled like a real screenshot frame */
.img-ph-hero {
  background: linear-gradient(145deg, #f1f5f9 0%, #e8edf5 100%);
  border: 1.5px dashed #94a3b8;
  border-radius: 0; /* inherits from parent frame */
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #94a3b8;
  font-size: 0.8125rem;
  font-family: ui-monospace, monospace;
  text-align: center;
  padding: 3rem 1.5rem;
  width: 100%;
}
.img-ph-hero svg { opacity: 0.3; }

/* ── Docs callout boxes ──────────────────────────────────── */
.callout {
  border-radius: 8px;
  padding: 0.875rem 1.125rem;
  margin: 1.25rem 0;
  display: flex;
  gap: 10px;
  font-size: 0.9rem;
  line-height: 1.6;
  border: 1px solid;
}
.callout-icon { flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; }
.callout.tip    { background: #f0fdf4; border-color: #86efac; color: #166534; }
.callout.info   { background: #eff6ff; border-color: #93c5fd; color: #1e40af; }
.callout.warn   { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.callout.danger { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }

/* ── Numbered step list ──────────────────────────────────── */
.step-list { counter-reset: step; list-style: none; padding: 0; margin: 1rem 0 1.5rem; }
.step-list li {
  counter-increment: step;
  display: flex;
  gap: 14px;
  padding: 0.625rem 0;
  align-items: flex-start;
  color: #374151;
  line-height: 1.65;
  font-size: 0.9375rem;
}
.step-list li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 26px; height: 26px;
  background: #4F46E5;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

/* ── On-page nav (right sidebar TOC) ────────────────────── */
.on-page-nav a {
  display: block;
  padding: 3px 0;
  font-size: 0.8125rem;
  color: #64748b;
  text-decoration: none;
  transition: color 0.15s;
}
.on-page-nav a:hover { color: #4F46E5; }
.on-page-nav a.active { color: #4F46E5; font-weight: 600; }

/* ── Field reference table ───────────────────────────────── */
.field-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.field-table th {
  background: #f8fafc;
  text-align: left;
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  font-weight: 600;
  color: #475569;
}
.field-table td { padding: 8px 12px; border: 1px solid #e2e8f0; color: #374151; vertical-align: top; }
.field-table tr:hover td { background: #fafafa; }
.badge-req  { display:inline-block; background:#fef3c7; color:#92400e; font-size:0.7rem; font-weight:600; padding:1px 7px; border-radius:999px; }
.badge-opt  { display:inline-block; background:#f1f5f9; color:#64748b; font-size:0.7rem; font-weight:600; padding:1px 7px; border-radius:999px; }
.badge-auto { display:inline-block; background:#ede9fe; color:#5b21b6; font-size:0.7rem; font-weight:600; padding:1px 7px; border-radius:999px; }

/* ── Responsive utilities ───────────────────────────────── */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}

.feat-screenshot { display: block; width: 100%; }
