/* CSS Design System for xhalo-blog Landing Page */

:root {
  /* Color Palette */
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-tertiary: #1f2937;
  
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --primary: #f48220; /* Cloudflare Orange */
  --primary-hover: #faad3f;
  --primary-glow: rgba(244, 130, 32, 0.3);
  
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-purple: #8b5cf6;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  
  --glass-bg: rgba(17, 24, 39, 0.7);
  --glass-card-bg: rgba(255, 255, 255, 0.02);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-blur: blur(12px);

  /* Fonts */
  --font-title: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.25;
  color: #ffffff;
}

h1 {
  font-size: 3.5rem;
  letter-spacing: -0.03em;
}

h2 {
  font-size: 2.5rem;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

p {
  color: var(--text-secondary);
}

.lead {
  font-size: 1.25rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Gradients & Special Text */
.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 50%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(244, 130, 32, 0.1);
  border: 1px solid rgba(244, 130, 32, 0.2);
  color: var(--primary);
  border-radius: 9999px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(244, 130, 32, 0.5);
}

.btn-secondary {
  background: var(--glass-card-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  backdrop-filter: var(--glass-blur);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.btn-tertiary {
  background: transparent;
  color: var(--text-secondary);
  padding: 12px 16px;
}

.btn-tertiary:hover {
  color: #ffffff;
  transform: translateX(4px);
}

/* Glassmorphism Cards */
.glass-card {
  background: var(--glass-card-bg);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  backdrop-filter: var(--glass-blur);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Header & Navbar */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.header-glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.5rem;
  color: #ffffff;
  text-decoration: none;
}

.logo-accent {
  color: var(--primary);
}

.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 28px;
}

.nav-links a:not(.btn) {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:not(.btn):hover {
  color: #ffffff;
}

/* Hero Section */
#hero {
  position: relative;
  padding: 160px 0 100px 0;
  overflow: hidden;
}

.hero-bg-glow {
  position: absolute;
  top: -150px;
  right: -50px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(244, 130, 32, 0.15) 0%, rgba(139, 92, 246, 0.05) 50%, transparent 100%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.hero-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  margin-bottom: 24px;
}

.hero-content p {
  margin-bottom: 36px;
  max-width: 580px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  align-items: center;
}

/* Hero Visual card */
.hero-visual {
  display: flex;
  justify-content: center;
}

.visual-card {
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.card-header {
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border-color);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.card-url {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-left: 12px;
}

.card-body {
  padding: 24px;
}

.terminal-code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
}

.code-comment { color: var(--text-muted); }
.code-success { color: #34d399; }
.code-info { color: #60a5fa; }

/* Sections */
.section-padding {
  padding: 100px 0;
}

.alt-bg {
  background-color: var(--bg-secondary);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 64px auto;
}

.section-lead {
  font-size: 1.15rem;
  margin-top: 16px;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.feature-card {
  padding: 36px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid var(--glass-border);
}

.feature-card h3 {
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 0.95rem;
}

/* Architecture Diagram */
.architecture-diagram-container {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 40px;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
}

.arch-svg {
  max-width: 720px;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
}

.node rect {
  transition: all 0.3s ease;
}

.node:hover rect {
  filter: brightness(1.1) saturate(1.1);
  transform: scale(1.02);
  transform-origin: center;
  cursor: pointer;
}

/* Quickstart Step Guide */
.setup-steps {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: relative;
}

.setup-steps::before {
  content: '';
  position: absolute;
  top: 30px;
  bottom: 30px;
  left: 25px;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary) 0%, var(--accent-purple) 100%);
  opacity: 0.2;
}

.setup-step {
  display: flex;
  gap: 32px;
  position: relative;
}

.step-num {
  width: 52px;
  height: 52px;
  background: var(--bg-secondary);
  border: 2px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
  z-index: 1;
  box-shadow: 0 0 15px var(--primary-glow);
  flex-shrink: 0;
}

.setup-step:nth-child(even) .step-num {
  border-color: var(--accent-purple);
  color: var(--accent-purple);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.step-info {
  padding-top: 10px;
  flex-grow: 1;
}

.step-info h3 {
  margin-bottom: 8px;
}

.step-info p {
  margin-bottom: 16px;
}

.terminal-inline {
  background: #060911;
  border: 1px solid var(--border-color);
  padding: 16px 20px;
  border-radius: 8px;
  overflow-x: auto;
}

.terminal-inline code {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #a7f3d0;
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
  padding: 48px 0;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-migration-note {
  width: 100%;
  padding: 20px 0 8px;
  border-bottom: 1px solid var(--border-color);
}

.footer-migration-note h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.footer-migration-note p {
  max-width: 760px;
  font-size: 0.92rem;
}

.footer-migration-note a {
  display: inline-block;
  margin-top: 8px;
  color: var(--primary-hover);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-migration-note a:hover {
  color: #ffffff;
}

.footer-container p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  list-style: none;
  gap: 24px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  h1 {
    font-size: 2.8rem;
  }
  
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 60px;
  }
  
  .hero-content p {
    margin: 0 auto 36px auto;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .setup-steps::before {
    left: 20px;
  }
  
  .step-num {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
  }
  
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 576px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .btn {
    width: 100%;
  }
  
  .nav-links {
    display: none; /* simple responsive fallback */
  }
}
