@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial');
  ascent-override: 90%;
  descent-override: 22%;
  line-gap-override: 0%;
  size-adjust: 107%;
}

body {
  font-family: 'Inter', 'Inter Fallback', system-ui, sans-serif;
}

.gradient-bg {
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
}

.hero-glow {
  background:
    radial-gradient(ellipse 60% 40% at 30% -10%, rgba(245, 158, 11, 0.1), transparent),
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(245, 158, 11, 0.15), transparent);
}

.hero-gradient-animated {
  background: linear-gradient(135deg, #0f172a 0%, #0c1a2e 25%, #0f172a 50%, #141a24 75%, #0f172a 100%);
  background-size: 400% 400%;
  animation: gradient-shift 8s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.text-gradient {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.code-block {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid #334155;
}

.terminal-window {
  background: #0f172a;
  border: 1px solid #334155;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.05),
    0 25px 50px -12px rgba(0, 0, 0, 0.6),
    0 0 100px -20px rgba(245, 158, 11, 0.2);
}

.feature-card {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.5) 0%, rgba(15, 23, 42, 0.3) 100%);
  border: 1px solid rgba(51, 65, 85, 0.5);
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  border-color: rgba(245, 158, 11, 0.3);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.5) 100%);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px -8px rgba(0, 0, 0, 0.4), 0 0 20px -4px rgba(245, 158, 11, 0.1);
}

.feature-tint-brand {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.05) 0%, rgba(30, 41, 59, 0.5) 30%, rgba(15, 23, 42, 0.3) 100%);
}

.feature-tint-accent {
  background: linear-gradient(180deg, rgba(52, 211, 153, 0.05) 0%, rgba(30, 41, 59, 0.5) 30%, rgba(15, 23, 42, 0.3) 100%);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #b45309 0%, #d97706 50%, #b45309 100%);
  background-size: 200% 200%;
  color: white;
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: 0.75rem;
  transition: background-position 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 14px -2px rgba(217, 119, 6, 0.4);
}

.btn-primary:hover {
  background-position: 100% 0;
  box-shadow: 0 6px 20px -2px rgba(217, 119, 6, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.8);
  color: white;
  font-weight: 600;
  padding: 0.875rem 2rem;
  border-radius: 0.75rem;
  border: 1px solid #334155;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.btn-secondary:hover {
  background: rgba(30, 41, 59, 1);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 4px 14px -2px rgba(245, 158, 11, 0.15);
  transform: translateY(-1px);
}

/* Copy tooltip */
.install-copy-btn {
  position: relative;
}

.copy-tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #34d399;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid #334155;
  white-space: nowrap;
  pointer-events: none;
  animation: tooltip-fade 2s ease forwards;
}

@keyframes tooltip-fade {
  0%, 70% { opacity: 1; }
  100% { opacity: 0; }
}

/* Scroll animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.delay-100 { transition-delay: 0.1s; }
.animate-on-scroll.delay-200 { transition-delay: 0.2s; }
.animate-on-scroll.delay-300 { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .hero-gradient-animated { animation: none; }
  .animate-on-scroll { opacity: 1; transform: none; transition: none; }
  .feature-card, .btn-primary, .btn-secondary { transition: none; }
  .feature-card:hover, .btn-primary:hover, .btn-secondary:hover { transform: none; }
}

/* Focus visibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Footer gradient border */
.footer-gradient-border {
  height: 1px;
  background: linear-gradient(90deg, transparent, #d97706, transparent);
}

/* Prose content */
.prose-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #f1f5f9;
  margin-top: 3rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.prose-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.prose-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.prose-content p {
  color: #f1f5f9;
  font-size: 1.0625rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.prose-content ul, .prose-content ol {
  color: #f1f5f9;
  font-size: 1.0625rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.prose-content ul { list-style-type: disc; }
.prose-content ol { list-style-type: decimal; }
.prose-content li { margin-bottom: 0.5rem; }

.prose-content code {
  font-family: 'JetBrains Mono', monospace;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid #334155;
  border-radius: 0.25rem;
  padding: 0.125rem 0.375rem;
  font-size: 0.875em;
  color: #fbbf24;
}

.prose-content pre {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid #334155;
  border-radius: 0.5rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.prose-content pre code {
  background: none;
  border: none;
  padding: 0;
  color: #f1f5f9;
  font-size: 0.875rem;
}

.prose-content a {
  color: #fbbf24;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.prose-content a:hover {
  color: #fde68a;
}

.prose-content strong {
  color: #f1f5f9;
  font-weight: 600;
}

.prose-content blockquote {
  border-left: 3px solid #d97706;
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: #f1f5f9;
  font-size: 1.0625rem;
  font-style: italic;
}

.prose-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5rem 0;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.5);
}

.prose-content table thead tr {
  background: rgba(30, 41, 59, 0.8);
}

.prose-content table th {
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
  text-align: left;
}

.prose-content table td {
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid rgba(30, 41, 59, 0.6);
  color: #f1f5f9;
}

.prose-content table tbody tr:last-child td {
  border-bottom: none;
}

.prose-content hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, #334155, transparent);
  margin: 2.5rem 0;
}

/* Docs layout */
.docs-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 4.5rem;
}

.docs-sidebar {
  width: 16rem;
  flex-shrink: 0;
  position: sticky;
  top: 4.5rem;
  height: calc(100vh - 4.5rem);
  overflow-y: auto;
  background: #080e1a;
  border-right: 1px solid rgba(30, 41, 59, 0.8);
  padding: 1.5rem 0;
}

.sidebar-header {
  padding: 0 1.25rem 1rem;
}

.sidebar-logo {
  font-weight: 700;
  font-size: 0.95rem;
  color: #f1f5f9;
  text-decoration: none;
}

.sidebar-logo:hover {
  color: #fbbf24;
}

.sidebar-section {
  margin-bottom: 0.5rem;
}

.sidebar-section-title {
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 1rem 1.25rem 0.4rem;
}

.sidebar-link {
  display: block;
  color: #e2e8f0;
  padding: 0.35rem 1.25rem;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  border-radius: 6px;
  margin: 1px 0.5rem;
}

.sidebar-link:hover {
  color: #f8fafc;
  background: rgba(251, 191, 36, 0.06);
}

.sidebar-link-active {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
  font-weight: 600;
}

.docs-content {
  flex: 1;
  min-width: 0;
  max-width: 45rem;
  padding: 2rem 3rem 4rem;
}

/* Mobile sidebar nav */
.mobile-sidebar-nav {
  display: none;
}

@media (max-width: 768px) {
  .docs-layout {
    flex-direction: column;
  }

  .docs-sidebar {
    display: none;
  }

  .mobile-sidebar-nav {
    display: block;
    padding: 1rem 1.25rem 0;
  }

  .docs-content {
    padding: 1rem 1.25rem 3rem;
  }
}

.mobile-sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-radius: 0.5rem;
  color: #e2e8f0;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.mobile-sidebar-toggle:hover {
  border-color: rgba(251, 191, 36, 0.3);
  background: rgba(30, 41, 59, 0.7);
}

.mobile-sidebar-toggle[aria-expanded="true"] {
  border-color: rgba(251, 191, 36, 0.3);
  border-radius: 0.5rem 0.5rem 0 0;
  border-bottom-color: transparent;
}

.mobile-sidebar-chevron {
  transition: transform 0.2s;
  flex-shrink: 0;
}

.mobile-sidebar-toggle[aria-expanded="true"] .mobile-sidebar-chevron {
  transform: rotate(180deg);
}

.mobile-sidebar-menu {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(51, 65, 85, 0.5);
  border-top: none;
  border-radius: 0 0 0.5rem 0.5rem;
  padding: 0.375rem 0;
  max-height: 60vh;
  overflow-y: auto;
}

.mobile-sidebar-section-title {
  color: #94a3b8;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.75rem 0.875rem 0.25rem;
}

.mobile-sidebar-link {
  display: block;
  color: #e2e8f0;
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.mobile-sidebar-link:hover {
  color: #f8fafc;
  background: rgba(251, 191, 36, 0.06);
}

.mobile-sidebar-link-active {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.08);
  font-weight: 600;
}
