/* ===== VibeMotion.net — Minimal Design System ===== */
/* Aesthetic: Stripe Docs / Apple — clean, spacious, precise */

/* ===== Base ===== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #111827;
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  margin: 0;
}

/* ===== Reset (Replaces Tailwind Preflight) ===== */
h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
}

p { margin: 0; }

ul, ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
  text-decoration: inherit;
}

img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

figure, blockquote, dl, dd {
  margin: 0;
  padding: 0;
}

button {
  cursor: pointer;
}

hr {
  border: none;
  border-top: 1px solid #f0f0f0;
}

/* ===== Page Transition ===== */
.page-transition {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 9999;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-transition.done {
  opacity: 0;
}

.page-transition.leaving {
  opacity: 1;
  pointer-events: all;
}

/* Page content fade-in */
body.loaded main {
  animation: pageContentIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

body.loaded footer {
  animation: pageContentIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s both;
}

@keyframes pageContentIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 64px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid #f0f0f0;
  transition: border-color 0.2s;
}

.nav.scrolled {
  border-bottom-color: #e5e5e5;
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-weight: 600;
  font-size: 17px;
  color: #111827;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 14px;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.15s;
  font-weight: 400;
}

.nav-links a:hover {
  color: #111827;
}

.nav-links a.active {
  color: #111827;
  font-weight: 500;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: #111827;
  margin: 4px 0;
  transition: all 0.25s;
}

/* ===== Content Container ===== */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

.container-narrow {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ===== Page Header ===== */
.page-header {
  padding: 84px 0 32px;
}

.page-header h1 {
  font-size: 52px;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #111827;
}

.page-header p {
  font-size: 18px;
  line-height: 1.6;
  color: #6b7280;
  margin-top: 16px;
  max-width: 520px;
}

/* ===== Cards ===== */
.card {
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 24px;
  transition: border-color 0.2s;
  background: #fff;
}

.card:hover {
  border-color: #d0d0d0;
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card-link:hover .card-arrow {
  transform: translateX(4px);
}

.card-arrow {
  transition: transform 0.2s;
  color: #9ca3af;
}

/* ===== List Items ===== */
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  color: inherit;
  transition: all 0.15s;
}

.list-item:hover {
  background: #fafafa;
  margin: 0 -16px;
  padding: 16px;
  border-radius: 8px;
}

.list-item:last-child {
  border-bottom: none;
}

/* ===== Tables ===== */
.clean-table {
  width: 100%;
  border-collapse: collapse;
}

.clean-table th {
  font-weight: 500;
  font-size: 13px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid #e8e8e8;
}

.clean-table td {
  font-size: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid #f5f5f5;
  color: #374151;
}

.clean-table tr:last-child td {
  border-bottom: none;
}

.clean-table tr:hover td {
  background: #fafafa;
}

/* ===== Code Blocks ===== */
pre {
  background: #f9f9f9;
  border: 1px solid #eee;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.7;
  color: #374151;
}

code {
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.88em;
}

p code {
  background: #f5f5f5;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid #eee;
}

/* ===== FAQ Accordion ===== */
.faq-item {
  border-bottom: 1px solid #f0f0f0;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: #111827;
  text-align: left;
  line-height: 1.5;
  transition: color 0.15s;
}

.faq-question:hover {
  color: #3B82F6;
}

.faq-icon {
  flex-shrink: 0;
  margin-left: 20px;
  font-size: 18px;
  color: #c0c0c0;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 300;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  color: #3B82F6;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-answer {
  max-height: 800px;
}

.faq-answer-inner {
  padding: 0 0 16px;
  font-size: 15px;
  line-height: 1.75;
  color: #6b7280;
}

.faq-answer-inner a {
  color: #3B82F6;
  text-decoration: none;
  border-bottom: 1px solid #3b82f633;
  transition: border-color 0.15s;
}

.faq-answer-inner a:hover {
  border-bottom-color: #3B82F6;
}

/* ===== Article Content ===== */
.article h2 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 48px 0 16px;
  padding-top: 28px;
  border-top: 1px solid #f0f0f0;
  color: #111827;
}

.article h2:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.article h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 28px 0 10px;
  color: #111827;
  letter-spacing: -0.01em;
}

.article p {
  font-size: 16px;
  line-height: 1.75;
  color: #374151;
  margin-bottom: 16px;
}

.article ul,
.article ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.article li {
  font-size: 16px;
  line-height: 1.75;
  color: #374151;
  margin-bottom: 8px;
}

.article a {
  color: #3B82F6;
  text-decoration: none;
  border-bottom: 1px solid #3b82f633;
  transition: border-color 0.15s;
}

.article a:hover {
  border-bottom-color: #3B82F6;
}

.article blockquote {
  border-left: 2px solid #3B82F6;
  padding: 16px 24px;
  margin: 20px 0;
  background: #fafbfc;
  border-radius: 0 8px 8px 0;
}

.article blockquote p {
  color: #374151;
  margin-bottom: 0;
  font-size: 15px;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #c0c0c0;
  margin-bottom: 24px;
}

.breadcrumb a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.15s;
}

.breadcrumb a:hover {
  color: #111827;
}

/* ===== TOC ===== */
.toc {
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 36px;
}

.toc h4 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9ca3af;
  margin-bottom: 12px;
}

.toc ol {
  list-style: decimal;
  padding-left: 20px;
  margin: 0;
}

.toc li {
  padding: 4px 0;
}

.toc a {
  font-size: 14px;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.15s;
}

.toc a:hover {
  color: #3B82F6;
}

/* ===== Section Label ===== */
.section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #3B82F6;
  margin-bottom: 6px;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid #f0f0f0;
  padding: 48px 0 36px;
  margin-top: 80px;
}

.footer a {
  color: #6b7280;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s;
}

.footer a:hover {
  color: #111827;
}

.footer h4 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9ca3af;
  margin-bottom: 14px;
}

/* ===== Fade-in Animation ===== */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children */
.fade-in-stagger > * {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-stagger.visible > *:nth-child(1) { transition-delay: 0s; }
.fade-in-stagger.visible > *:nth-child(2) { transition-delay: 0.08s; }
.fade-in-stagger.visible > *:nth-child(3) { transition-delay: 0.16s; }
.fade-in-stagger.visible > *:nth-child(4) { transition-delay: 0.24s; }
.fade-in-stagger.visible > *:nth-child(5) { transition-delay: 0.32s; }
.fade-in-stagger.visible > *:nth-child(6) { transition-delay: 0.4s; }

.fade-in-stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Accent Link ===== */
.accent-link {
  color: #3B82F6;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s;
}

.accent-link:hover {
  gap: 10px;
}

/* ===== Tag ===== */
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 100px;
  background: #f5f5f5;
  color: #6b7280;
  letter-spacing: 0.02em;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid #f0f0f0;
    flex-direction: column;
    padding: 20px 32px;
    gap: 16px;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .page-header {
    padding: 76px 0 24px;
  }

  .page-header h1 {
    font-size: 36px;
    line-height: 1.12;
  }

  .page-header p {
    font-size: 16px;
  }

  .container,
  .container-narrow {
    padding: 0 20px;
  }

  .nav-inner {
    padding: 0 20px;
  }

  .card {
    padding: 20px;
  }

  .article h2 {
    font-size: 22px;
    margin: 36px 0 12px;
    padding-top: 24px;
  }

  .article h3 {
    font-size: 17px;
  }

  .footer {
    margin-top: 60px;
    padding: 36px 0 28px;
  }
}

@media (max-width: 480px) {
  .page-header h1 {
    font-size: 30px;
  }

  .list-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ===== Utility Classes (Tailwind CDN Replacements) ===== */

/* Display */
.inline-block { display: inline-block; }
.flex { display: flex; }
.grid { display: grid; }

/* Flexbox */
.flex-col { flex-direction: column; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

/* Grid */
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Gap */
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Padding */
.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-10 { padding: 2.5rem; }
.p-12 { padding: 3rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-20 { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.pt-8 { padding-top: 2rem; }
.pt-24 { padding-top: 6rem; }
.pt-40 { padding-top: 7.5rem; }
.pb-20 { padding-bottom: 3.5rem; }
.pb-24 { padding-bottom: 4rem; }
.pb-28 { padding-bottom: 4.5rem; }
.pl-5 { padding-left: 1.25rem; }

/* Margin */
.m-0 { margin: 0; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-6 { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.my-8 { margin-top: 2rem; margin-bottom: 2rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.25rem; }
.mt-12 { margin-top: 2.5rem; }
.mt-24 { margin-top: 4rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.25rem; }
.mb-12 { margin-bottom: 2.5rem; }

/* Space-Y (vertical child spacing) */
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }

/* Typography: Size */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-6xl { font-size: 3.75rem; line-height: 1; }

/* Typography: Weight */
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Typography: Alignment */
.text-center { text-align: center; }

/* Typography: Line Height */
.leading-relaxed { line-height: 1.625; }
.leading-\[1\.1\] { line-height: 1.1; }

/* Typography: Letter Spacing */
.tracking-tight { letter-spacing: -0.025em; }

/* Typography: Decoration */
.line-through { text-decoration-line: line-through; }

/* Colors: Text */
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-900 { color: #111827; }
.text-blue-500 { color: #3b82f6; }
.text-red-500 { color: #ef4444; }

/* Sizing */
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-4xl { max-width: 56rem; }

/* Overflow */
.overflow-x-auto { overflow-x: auto; }

/* Margin X */
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }

/* Button */
.btn {
  display: inline-block;
  padding: 12px 32px;
  background: #3B82F6;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s;
  cursor: pointer;
}

.btn:hover {
  background: #2563EB;
}

/* Hover Variants */
.hover\:text-gray-600:hover { color: #4b5563; }
.hover\:underline:hover { text-decoration: underline; }

/* List Style */
.list-disc { list-style-type: disc; padding-left: 18px; }

/* Line Height: Arbitrary */
.leading-\[1\.7\] { line-height: 1.7; }

/* Border */
.border-l-accent { border-left: 2px solid #3B82F6; }
.border-t { border-top: 1px solid #f0f0f0; }

/* Letter Spacing */
.tracking-wide { letter-spacing: 0.08em; }

/* Max Width */
.max-w-800 { max-width: 800px; }
.max-w-500 { max-width: 500px; }
.max-w-720 { max-width: 720px; }

/* Responsive: md (min-width: 768px) */
@media (min-width: 768px) {
  .md\:text-5xl { font-size: 3rem; line-height: 1; }
  .md\:text-6xl { font-size: 3.75rem; line-height: 1; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
