/* ==========================================================================
   FORJA ARTIFICIAL - DESIGN SYSTEM & STYLESHEET
   Aesthetic: Obsidian Dark Tech Luxury & Restrained Forge Minimalist
   Taste-Skill Directives: Clean Typography, High Contrast, Tactile Physics
   ========================================================================== */

/* Design Tokens */
:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Color Palette: Obsidian, Titanium & Molten Amber */
  --color-obsidian: #08090d;
  --color-zinc-950: #0c0e14;
  --color-zinc-900: #12161f;
  --color-zinc-800: #1e2430;
  --color-zinc-700: #333d4f;
  --color-zinc-400: #94a3b8;
  --color-zinc-300: #cbd5e1;
  --color-zinc-200: #e2e8f0;
  --color-white: #ffffff;

  /* Signature Accent: Molten Amber / Gold Forge */
  --accent-amber: #f59e0b;
  --accent-amber-light: #fbbf24;
  --accent-amber-glow: rgba(245, 158, 11, 0.25);
  --accent-amber-subtle: rgba(245, 158, 11, 0.08);

  /* Status Colors */
  --color-emerald: #10b981;
  --color-red: #ef4444;

  /* Radius System (Unified Scale: 12px / 16px / 24px / 9999px) */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  /* Transition Physics */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
}

/* Base Resets & Layout */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  background-color: var(--color-obsidian);
  color: var(--color-zinc-200);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100dvh;
  background-color: var(--color-obsidian);
  overflow-x: hidden;
  line-height: 1.6;
}

h1 {
  line-height: 1.15;
}

h2, h3 {
  line-height: 1.2;
}

.leading-\[1\.1\],
.leading-\[1\.08\],
.leading-tight {
  line-height: 1.15;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 7px;
}
::-webkit-scrollbar-track {
  background: var(--color-obsidian);
}
::-webkit-scrollbar-thumb {
  background: var(--color-zinc-800);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-zinc-700);
}

/* Ambient Background Canvas & Patterns */
#forge-ambient-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-grid-pattern {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

.bg-radial-glow {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.12) 0%, rgba(8, 9, 13, 0) 70%);
}

/* Typography Utilities */
.font-mono { font-family: var(--font-mono); }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-tighter { letter-spacing: -0.05em; }
.tracking-widest { letter-spacing: 0.15em; }

/* Interactive Buttons & Tactile Feedback */
.btn-primary {
  background: var(--accent-amber);
  color: #050608;
  font-weight: 700;
  transition: all var(--duration-normal) var(--ease-spring);
  box-shadow: 0 4px 20px -2px var(--accent-amber-glow);
  text-decoration: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--accent-amber-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px -4px rgba(245, 158, 11, 0.4);
}

.btn-primary:active {
  transform: translateY(1px) scale(0.98);
}

.btn-secondary {
  background: rgba(18, 22, 31, 0.8);
  color: var(--color-zinc-300);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--duration-normal) var(--ease-spring);
  text-decoration: none;
  cursor: pointer;
}

.btn-secondary:hover {
  background: rgba(30, 36, 48, 0.9);
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: translateY(1px) scale(0.98);
}

/* Nav Links Micro-Interactions */
.nav-link {
  position: relative;
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-amber);
  transition: width var(--duration-normal) var(--ease-spring);
  border-radius: var(--radius-pill);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--color-white);
}

/* Simulator Tabs & Steps */
.sim-tab {
  background: rgba(18, 22, 31, 0.8);
  color: var(--color-zinc-400);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.sim-tab:hover {
  background: rgba(30, 36, 48, 0.8);
  color: var(--color-white);
}

.sim-tab.active {
  background: var(--accent-amber-subtle);
  color: var(--accent-amber);
  border-color: var(--accent-amber);
  box-shadow: 0 0 15px -3px var(--accent-amber-glow);
}

.sim-step {
  transition: all var(--duration-normal) ease;
}

.sim-step.step-active {
  border-color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.05);
  box-shadow: 0 0 20px -5px var(--accent-amber-glow);
  transform: translateX(4px);
}

.sim-step.step-completed {
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.03);
}

/* Slider Controls */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  background: var(--color-zinc-800);
  height: 6px;
  border-radius: 9999px;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-amber);
  cursor: pointer;
  box-shadow: 0 0 10px var(--accent-amber-glow);
  transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Keyframe Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.4s var(--ease-spring) forwards;
}

/* Tailwind-Like Helper Utilities for Pure Vanilla Environment */
.max-w-7xl { max-width: 80rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-xl { max-width: 36rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

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

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }

.w-full { width: 100%; }
.h-full { height: 100%; }
.w-4 { width: 1rem; } .h-4 { height: 1rem; }
.w-5 { width: 1.25rem; } .h-5 { height: 1.25rem; }
.w-6 { width: 1.5rem; } .h-6 { height: 1.5rem; }
.w-8 { width: 2rem; } .h-8 { height: 2rem; }
.w-9 { width: 2.25rem; } .h-9 { height: 2.25rem; }
.w-10 { width: 2.5rem; } .h-10 { height: 2.5rem; }
.w-12 { width: 3rem; } .h-12 { height: 3rem; }
.w-32 { width: 8rem; } .h-32 { height: 8rem; }

.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-7 { padding-left: 1.75rem; padding-right: 1.75rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-3\.5 { padding-top: 0.875rem; padding-bottom: 0.875rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.pt-4 { padding-top: 1rem; }
.pt-6 { padding-top: 1.5rem; }
.pt-28 { padding-top: 7rem; }
.pb-4 { padding-bottom: 1rem; }
.pb-6 { padding-bottom: 1.5rem; }
.pb-12 { padding-bottom: 3rem; }
.pb-16 { padding-bottom: 4rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.rounded-lg { border-radius: var(--radius-sm); }
.rounded-xl { border-radius: var(--radius-md); }
.rounded-2xl { border-radius: var(--radius-lg); }
.rounded-3xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-pill); }

.border { border-width: 1px; border-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-y { border-top-width: 1px; border-bottom-width: 1px; border-style: solid; }

.border-zinc-800 { border-color: rgba(255, 255, 255, 0.08); }
.border-zinc-700 { border-color: rgba(255, 255, 255, 0.15); }
.border-amber-400 { border-color: var(--accent-amber); }
.border-white\/10 { border-color: rgba(255, 255, 255, 0.1); }

.bg-obsidian { background-color: var(--color-obsidian); }
.bg-zinc-950 { background-color: var(--color-zinc-950); }
.bg-zinc-900 { background-color: var(--color-zinc-900); }
.bg-zinc-800 { background-color: var(--color-zinc-800); }
.bg-amber-400 { background-color: var(--accent-amber); }
.bg-emerald-950\/60 { background-color: rgba(6, 78, 59, 0.6); }

.text-white { color: var(--color-white); }
.text-zinc-200 { color: var(--color-zinc-200); }
.text-zinc-300 { color: var(--color-zinc-300); }
.text-zinc-400 { color: var(--color-zinc-400); }
.text-zinc-500 { color: var(--color-zinc-700); }
.text-zinc-600 { color: #64748b; }
.text-zinc-950 { color: #090a0f; }
.text-amber-400 { color: var(--accent-amber); }
.text-amber-300 { color: var(--accent-amber-light); }
.text-emerald-400 { color: var(--color-emerald); }
.text-red-400 { color: var(--color-red); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-xs { font-size: 0.75rem; line-height: 1.35; }
.text-sm { font-size: 0.875rem; line-height: 1.45; }
.text-base { font-size: 1rem; line-height: 1.6; }
.text-lg { font-size: 1.125rem; line-height: 1.5; }
.text-xl { font-size: 1.25rem; line-height: 1.4; }
.text-2xl { font-size: 1.5rem; line-height: 1.3; }
.text-3xl { font-size: 1.875rem; line-height: 1.2; }
.text-4xl { font-size: 2.25rem; line-height: 1.15; }
.text-5xl { font-size: 3rem; line-height: 1.12; }
.text-6xl { font-size: 3.75rem; line-height: 1.08; }

.leading-none { line-height: 1 !important; }
.leading-tight { line-height: 1.15 !important; }
.leading-snug { line-height: 1.25 !important; }
.leading-normal { line-height: 1.5 !important; }
.leading-relaxed { line-height: 1.625 !important; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); }
.backdrop-blur-xl { backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.backdrop-blur-2xl { backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px); }

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

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:flex-row { flex-direction: row; }
  .sm\:text-left { text-align: left; }
  .sm\:text-5xl { font-size: 3rem; line-height: 1.15; }
  .sm\:text-base { font-size: 1rem; line-height: 1.5rem; }
  .sm\:inline { display: inline; }
}

@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:hidden { display: none; }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .md\:col-span-4 { grid-column: span 4 / span 4; }
  .md\:col-span-5 { grid-column: span 5 / span 5; }
  .md\:col-span-7 { grid-column: span 7 / span 7; }
  .md\:flex-row { flex-direction: row; }
  .md\:items-end { align-items: flex-end; }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .lg\:col-span-4 { grid-column: span 4 / span 4; }
  .lg\:col-span-5 { grid-column: span 5 / span 5; }
  .lg\:col-span-7 { grid-column: span 7 / span 7; }
  .lg\:col-span-8 { grid-column: span 8 / span 8; }
  .lg\:text-6xl { font-size: 3.75rem; line-height: 1.12; }
  .lg\:text-left { text-align: left; }
}

/* Focus and Accessibility */
*:focus-visible {
  outline: 2px solid var(--accent-amber);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
