/* ===================================
   Linked Objects - Modern Design
   Soft Color Palette & Clean Aesthetics
   =================================== */

:root {
  /* Soft Color Palette */
  --primary-50: #f0f4ff;
  --primary-100: #e0e9ff;
  --primary-200: #c7d7fe;
  --primary-300: #a5b9fc;
  --primary-400: #8699f8;
  --primary-500: #6b7ff2;
  --primary-600: #5461e6;
  --primary-700: #4650cb;
  --primary-800: #3a42a4;
  --primary-900: #333b82;

  --accent-50: #faf5ff;
  --accent-100: #f3e8ff;
  --accent-200: #e9d5ff;
  --accent-300: #d8b4fe;
  --accent-400: #c084fc;
  --accent-500: #a855f7;
  --accent-600: #9333ea;
  --accent-700: #7e22ce;

  --neutral-50: #fafafa;
  --neutral-100: #f5f5f5;
  --neutral-200: #e5e5e5;
  --neutral-300: #d4d4d4;
  --neutral-400: #a3a3a3;
  --neutral-500: #737373;
  --neutral-600: #525252;
  --neutral-700: #404040;
  --neutral-800: #262626;
  --neutral-900: #171717;

  --success-light: #d1fae5;
  --success: #10b981;
  --success-dark: #047857;

  --code-bg: #f8fafc;
  --code-border: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

/* Dark Mode Variables */
.dark-mode {
  --primary-50: #1e293b;
  --primary-100: #334155;
  --neutral-50: #0f172a;
  --neutral-100: #1e293b;
  --neutral-200: #334155;
  --neutral-800: #e2e8f0;
  --neutral-900: #f1f5f9;
  --code-bg: #1e293b;
  --code-border: #334155;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--neutral-800);
  background-color: var(--neutral-50);
  font-size: 16px;
}

/* ===================================
   Hero Section
   =================================== */

.hero {
  background: linear-gradient(135deg, var(--primary-50) 0%, var(--accent-50) 100%);
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 20% 30%, var(--primary-100) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, var(--accent-100) 0%, transparent 50%);
  opacity: 0.6;
  z-index: 0;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-logo {
  max-width: 200px;
  height: auto;
  margin-bottom: 1.5rem;
  animation: fadeInDown 0.8s ease-out;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--primary-800);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-tagline {
  font-size: 1.5rem;
  color: var(--neutral-600);
  margin-bottom: 2rem;
  font-weight: 400;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.8s both;
}

.btn {
  padding: 0.875rem 2rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--primary-600);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--primary-700);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: white;
  color: var(--primary-600);
  border: 2px solid var(--primary-300);
}

.btn-secondary:hover {
  background: var(--primary-50);
  border-color: var(--primary-400);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--primary-700);
  border: 2px solid var(--primary-500);
}

.btn-outline:hover {
  background: var(--primary-600);
  color: white;
}

/* ===================================
   Container & Layout
   =================================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-800);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.section-subtitle {
  font-size: 1.25rem;
  color: var(--neutral-600);
  max-width: 700px;
  margin: 0 auto;
}

/* ===================================
   Features Cards Grid
   =================================== */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-card {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--neutral-200);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-500), var(--accent-500));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-200);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-100), var(--accent-100));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--primary-600);
}

.feature-card h3 {
  font-size: 1.5rem;
  color: var(--primary-800);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.feature-card p {
  color: var(--neutral-600);
  line-height: 1.7;
  margin: 0;
}

/* ===================================
   Code Examples Section
   =================================== */

.code-examples {
  background: white;
  padding: 4rem 0;
}

.code-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--neutral-200);
}

.code-tab {
  padding: 0.875rem 1.5rem;
  background: transparent;
  border: none;
  color: var(--neutral-600);
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.code-tab:hover {
  color: var(--primary-600);
  background: var(--primary-50);
}

.code-tab.active {
  color: var(--primary-700);
  border-bottom-color: var(--primary-600);
}

.code-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.code-panel.active {
  display: block;
}

.code-block {
  position: relative;
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.code-header {
  background: var(--neutral-100);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--code-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.code-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--neutral-700);
}

.copy-btn {
  padding: 0.375rem 0.875rem;
  background: white;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  color: var(--neutral-700);
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: var(--primary-50);
  border-color: var(--primary-300);
  color: var(--primary-700);
}

.copy-btn.copied {
  background: var(--success-light);
  border-color: var(--success);
  color: var(--success-dark);
}

.code-content {
  padding: 1.5rem;
  overflow-x: auto;
}

pre {
  margin: 0;
  font-family: 'JetBrains Mono', 'Fira Code', Monaco, 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

code {
  font-family: inherit;
  color: var(--neutral-800);
}

/* Syntax Highlighting */
.json-key { color: var(--primary-700); }
.json-string { color: var(--success-dark); }
.json-number { color: var(--accent-600); }
.json-boolean { color: #f59e0b; }
.json-null { color: #ef4444; }

/* ===================================
   API Section
   =================================== */

.api-grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

.api-method {
  background: white;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.api-method h3 {
  font-family: 'JetBrains Mono', monospace;
  color: var(--primary-700);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding: 0.5rem 1rem;
  background: var(--primary-50);
  border-left: 4px solid var(--primary-500);
  border-radius: var(--radius-sm);
}

.api-method p {
  color: var(--neutral-600);
  margin-bottom: 1rem;
}

.api-params {
  background: var(--neutral-50);
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-top: 1rem;
}

.api-params strong {
  color: var(--primary-700);
}

/* ===================================
   Footer
   =================================== */

.footer {
  background: var(--neutral-100);
  padding: 3rem 0;
  text-align: center;
  border-top: 1px solid var(--neutral-200);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--primary-600);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--primary-800);
}

.footer-text {
  color: var(--neutral-600);
  font-size: 0.95rem;
}

/* ===================================
   Dark Mode Toggle
   =================================== */

.dark-mode-toggle {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background: white;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  z-index: 1000;
}

.dark-mode-toggle:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-xl);
}

/* ===================================
   Animations
   =================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-tagline {
    font-size: 1.25rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .hero-cta {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 3rem 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .section {
    padding: 3rem 0;
  }

  .container {
    padding: 0 1rem;
  }
}

/* ===================================
   Utility Classes
   =================================== */

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
