/* style.css - Premium Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Color System */
  --primary: #3b82f6; /* Modern Blue */
  --primary-hover: #2563eb;
  --text: #0f172a;
  --text-muted: #64748b;
  --background: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --success: #10b981;
  --danger: #ef4444;
  --editor-bg: #0f172a;
  --editor-text: #e2e8f0;
  
  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  
  /* Layout */
  --container-width: 1200px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);

  /* Typography */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  
  /* Transitions */
  --transition: 200ms ease;
}

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

html, body {
  max-width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background-color: var(--background);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 1.75rem); }
p { color: var(--text-muted); }
small { font-size: 0.875rem; color: var(--text-muted); }

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

/* Layout */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

main {
  flex: 1;
}

.section {
  padding: 5rem 0;
}

@media (max-width: 768px) {
  .section {
    padding: 3rem 0;
  }
}

/* Header & Nav */
.site-header {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
}

.logo svg {
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9375rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

/* Button System */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.5;
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  background-color: var(--surface-alt);
  color: var(--text);
  border-color: var(--text);
}

.btn-secondary {
  background-color: var(--surface-alt);
  color: var(--text);
  border-color: transparent;
}

.btn-secondary:hover {
  background-color: var(--border);
}

.btn-small {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

.btn svg {
  width: 18px;
  height: 18px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text);
}

/* Hero Section */
.hero {
  padding: 6rem 0;
  background: radial-gradient(circle at top, var(--surface), var(--background));
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  margin-bottom: 1.25rem;
}

.hero p.lead {
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.hero-trust {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.hero-trust-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.hero-trust-item svg {
  width: 16px;
  height: 16px;
  color: var(--success);
}

/* Hero Preview (HTML/CSS Based) */
.hero-preview {
  margin-top: 4rem;
  background: var(--editor-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-align: left;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
}

.hero-preview-header {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mac-dots {
  display: flex;
  gap: 6px;
}

.mac-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.mac-dot.red { background: #ff5f56; }
.mac-dot.yellow { background: #ffbd2e; }
.mac-dot.green { background: #27c93f; }

.hero-preview-title {
  margin-left: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-family: var(--font-mono);
}

.hero-preview-body {
  display: grid;
  grid-template-columns: 1fr 40px 1fr;
  padding: 1.5rem;
  gap: 1rem;
  align-items: center;
}

.code-block {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--editor-text);
  white-space: pre;
}

.code-block .keyword { color: #c678dd; }
.code-block .property { color: #56b6c2; }
.code-block .value { color: #e5c07b; }
.code-block .selector { color: #e06c75; }

.preview-arrow {
  color: var(--text-muted);
  display: flex;
  justify-content: center;
}

/* Section Common */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.feature-card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

/* How It Works (Steps) */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.step-card {
  text-align: center;
  padding: 2rem;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.step-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--border-strong);
  margin-bottom: 1rem;
  line-height: 1;
}

.step-card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

/* Blog/Article Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition);
}

.blog-card:hover {
  box-shadow: var(--shadow-md);
}

.blog-card-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
}

.blog-card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.blog-card h2 a {
  color: var(--text);
}

.blog-card h2 a:hover {
  color: var(--primary);
}

.blog-card p {
  margin-bottom: 1.5rem;
  flex: 1;
}

.blog-card .read-more {
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Article Prose */
.article-header {
  text-align: center;
  margin-bottom: 3rem;
  max-width: 800px;
  margin: 0 auto 3rem;
}

.breadcrumb {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--text-muted);
}
.breadcrumb a:hover {
  color: var(--primary);
}

.article-header h1 {
  margin-bottom: 1rem;
}

.article-meta {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.prose {
  max-width: 720px;
  margin: 0 auto;
}

.prose h2, .prose h3, .prose h4 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.prose p {
  margin-bottom: 1.5rem;
  color: var(--text);
}

.prose ul, .prose ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
  color: var(--text);
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose pre {
  background: var(--editor-bg);
  color: var(--editor-text);
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.5;
  border: 1px solid var(--border);
}

.prose code {
  background: var(--surface-alt);
  color: var(--text);
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.875em;
  border: 1px solid var(--border);
}

.prose pre code {
  background: transparent;
  padding: 0;
  border: none;
  color: inherit;
}

.prose img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
}

/* FAQ Accordion */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.5rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
}

.faq-question:hover {
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.faq-answer-content {
  padding-bottom: 1.5rem;
  color: var(--text-muted);
}

.faq-question[aria-expanded="true"] .icon {
  transform: rotate(180deg);
}

.faq-question .icon {
  transition: transform 0.3s ease;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand .logo {
  margin-bottom: 1rem;
}

.footer-brand p {
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}

.footer-col h3 {
  font-size: 1rem;
  margin-bottom: 1.25rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.75rem;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
  .steps-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--surface);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  
  .nav-links.active {
    display: flex;
  }
  
  .mobile-menu-btn {
    display: block;
  }

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

  .hero-actions .btn {
    width: 100%;
  }

  .hero-trust {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .hero-preview-body {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .preview-arrow {
    transform: rotate(90deg);
  }

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

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
