/* FeLLAMA — Custom Styles */

:root {
  --iron-50:  #fafaf9;
  --iron-100: #f5f5f4;
  --iron-200: #e7e5e4;
  --iron-300: #d6d3d1;
  --iron-400: #a8a29e;
  --iron-500: #78716c;
  --iron-600: #57534e;
  --iron-700: #44403c;
  --iron-800: #292524;
  --iron-850: #1f1d1c;
  --iron-900: #1c1917;
  --iron-950: #0c0a09;

  --rust-400: #fb923c;
  --rust-500: #f97316;
  --rust-600: #ea580c;
  --rust-700: #c2410c;

  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
}

/* Base */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  background: var(--iron-950);
  color: var(--iron-200);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Navigation */
.nav-blur {
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  background: rgba(12, 10, 9, 0.8);
  border-bottom: 1px solid rgba(251, 146, 60, 0.1);
}

.nav-link {
  position: relative;
  color: var(--iron-400);
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--rust-400);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--rust-500);
  border-radius: 1px;
}

/* Hero */
.hero-gradient {
  background: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(234, 88, 12, 0.15), transparent),
              radial-gradient(ellipse 60% 40% at 80% 0%, rgba(251, 146, 60, 0.08), transparent);
}

.hero-title {
  background: linear-gradient(135deg, var(--iron-100) 0%, var(--rust-400) 50%, var(--amber-400) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  color: var(--iron-400);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--rust-600), var(--rust-500));
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.2s;
  display: inline-block;
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.2);
}

.btn-primary:hover {
  box-shadow: 0 0 30px rgba(249, 115, 22, 0.35);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--iron-200);
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  border: 1px solid var(--iron-600);
  transition: all 0.2s;
  display: inline-block;
}

.btn-secondary:hover {
  border-color: var(--rust-500);
  color: var(--rust-400);
}

/* Feature Cards */
.feature-card {
  background: linear-gradient(135deg, var(--iron-900), var(--iron-850));
  border: 1px solid var(--iron-800);
  border-radius: 1rem;
  padding: 2rem;
  transition: all 0.3s;
}

.feature-card:hover {
  border-color: rgba(251, 146, 60, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  background: rgba(249, 115, 22, 0.1);
  border: 1px solid rgba(249, 115, 22, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* Architecture Diagram */
.arch-box {
  background: var(--iron-900);
  border: 1px solid var(--iron-700);
  border-radius: 0.5rem;
  padding: 0.75rem 1.25rem;
  text-align: center;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.875rem;
}

.arch-box.highlight {
  border-color: var(--rust-500);
  background: rgba(249, 115, 22, 0.05);
}

.arch-arrow {
  color: var(--iron-600);
  font-size: 1.5rem;
  text-align: center;
}

/* Code Blocks */
.code-block {
  background: var(--iron-900);
  border: 1px solid var(--iron-800);
  border-radius: 0.75rem;
  overflow: hidden;
}

.code-block-header {
  background: var(--iron-850);
  border-bottom: 1px solid var(--iron-800);
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.code-block-header span {
  color: var(--iron-500);
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
}

.code-block pre {
  padding: 1.25rem;
  overflow-x: auto;
  margin: 0;
}

.code-block code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--iron-200);
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--iron-700);
  color: var(--iron-500);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.copy-btn:hover {
  border-color: var(--rust-500);
  color: var(--rust-400);
}

/* Section styling */
.section-title {
  color: var(--iron-100);
  font-weight: 700;
}

.section-label {
  color: var(--rust-500);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-divider {
  border-color: var(--iron-800);
}

/* Steps */
.step-number {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(249, 115, 22, 0.1);
  border: 2px solid var(--rust-500);
  color: var(--rust-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.step-line {
  width: 2px;
  background: var(--iron-800);
  min-height: 2rem;
  margin-left: calc(1.25rem - 1px);
}

/* Doc sidebar */
.doc-sidebar {
  position: sticky;
  top: 6rem;
}

.doc-sidebar a {
  display: block;
  padding: 0.4rem 1rem;
  color: var(--iron-500);
  border-left: 2px solid var(--iron-800);
  font-size: 0.875rem;
  transition: all 0.2s;
}

.doc-sidebar a:hover,
.doc-sidebar a.active {
  color: var(--rust-400);
  border-left-color: var(--rust-500);
}

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

.doc-table th {
  background: var(--iron-900);
  color: var(--iron-300);
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--iron-700);
  font-size: 0.875rem;
}

.doc-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--iron-800);
  font-size: 0.875rem;
  color: var(--iron-300);
}

.doc-table tr:hover td {
  background: rgba(249, 115, 22, 0.03);
}

.doc-table code {
  background: var(--iron-900);
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.8rem;
  color: var(--rust-400);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 4rem;
  left: 0;
  right: 0;
  background: rgba(12, 10, 9, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--iron-800);
  padding: 1rem;
  z-index: 40;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--iron-400);
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.mobile-menu a:hover {
  background: var(--iron-900);
  color: var(--rust-400);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--iron-400);
  transition: all 0.3s;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Config field */
.config-field {
  background: var(--iron-900);
  border: 1px solid var(--iron-800);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.config-field-name {
  font-family: 'JetBrains Mono', monospace;
  color: var(--rust-400);
  font-weight: 600;
}

.config-field-type {
  font-family: 'JetBrains Mono', monospace;
  color: var(--iron-500);
  font-size: 0.8rem;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--iron-950);
}

::-webkit-scrollbar-thumb {
  background: var(--iron-700);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--iron-600);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-delay-100 { animation-delay: 0.1s; opacity: 0; }
.animate-delay-200 { animation-delay: 0.2s; opacity: 0; }
.animate-delay-300 { animation-delay: 0.3s; opacity: 0; }
.animate-delay-400 { animation-delay: 0.4s; opacity: 0; }

/* Responsive */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .desktop-nav {
    display: none;
  }

  .hero-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }
}

/* Glow effects */
.glow-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--rust-500), transparent);
  opacity: 0.3;
}

/* Badge */
.badge {
  background: rgba(249, 115, 22, 0.1);
  color: var(--rust-400);
  border: 1px solid rgba(249, 115, 22, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Inline code */
p code, li code, td code {
  background: var(--iron-900);
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  color: var(--rust-400);
}
