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

:root {
  --blue: #016EEA;
  --blue-dark: #0155b8;
  --blue-light: #4da3ff;
  --bg-primary: #0b0d13;
  --bg-secondary: #111318;
  --bg-card: #16181e;
  --bg-card-hover: #1c1f27;
  --bg-code: #1a1d25;
  --text-primary: #f2f3f5;
  --text-secondary: #b5bac1;
  --text-muted: #80848e;
  --border: #2a2d35;
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1120px;
  --nav-height: 64px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--blue-light);
  text-decoration: none;
  transition: color 0.2s;
}

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

code {
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
  background: var(--bg-code);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.875em;
  word-break: break-word;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  overflow-x: hidden;
}

/* === Navigation === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(11, 13, 19, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: height 0.3s, background 0.3s, box-shadow 0.3s;
}

.nav.scrolled {
  height: 52px;
  background: rgba(11, 13, 19, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.nav-logo:hover {
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

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

.nav-github {
  background: var(--bg-card);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.nav-github:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

/* === Hero === */
.hero {
  padding: 160px 24px 100px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0%, rgba(1, 110, 234, 0.12) 0%, transparent 60%);
}

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

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(1, 110, 234, 0.1);
  border: 1px solid rgba(1, 110, 234, 0.25);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--blue-light);
  margin-bottom: 24px;
  letter-spacing: 0.025em;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero-emoji {
  display: inline-block;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.hero-philosophy {
  display: inline-block;
  padding: 8px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  font-style: italic;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

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

.btn-primary:hover {
  background: var(--blue-dark);
  color: #fff;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}

/* === Sections === */
.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-title {
  font-size: 2.25rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-bottom: 56px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* === Features Grid === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: rgba(1, 110, 234, 0.3);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* === Pipeline === */
.pipeline {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.pipeline-step {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  transition: border-color 0.2s;
}

.pipeline-step:hover {
  border-color: rgba(1, 110, 234, 0.3);
}

.pipeline-step-final {
  border-color: rgba(1, 110, 234, 0.4);
  background: rgba(1, 110, 234, 0.04);
}

.pipeline-number {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  border-radius: 50%;
}

.pipeline-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.pipeline-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.pipeline-connector {
  width: 2px;
  height: 24px;
  background: var(--border);
}

.pipeline-fan {
  width: 100%;
}

.pipeline-fan-label {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.pipeline-fan-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pipeline-step-sm {
  padding: 20px;
}

.pipeline-step-sm .pipeline-number {
  width: 36px;
  height: 36px;
  font-size: 0.8rem;
}

.pipeline-step-sm .pipeline-content h3 {
  font-size: 0.95rem;
}

.pipeline-step-sm .pipeline-content p {
  font-size: 0.8rem;
}

.pipeline-aside {
  text-align: center;
  margin-top: 24px;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* === Ecosystems Grid === */
.eco-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.eco-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}

.eco-card:hover {
  border-color: rgba(1, 110, 234, 0.3);
  transform: translateY(-2px);
}

.eco-card-custom {
  border-style: dashed;
}

.eco-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.eco-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.eco-detect {
  font-size: 0.75rem;
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
  color: var(--blue-light);
  background: rgba(1, 110, 234, 0.08);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 10px;
}

.eco-card p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* === Workflow Grid === */
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.workflow-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.workflow-card:hover {
  border-color: rgba(1, 110, 234, 0.3);
  transform: translateY(-2px);
}

.workflow-card-primary {
  border-color: rgba(1, 110, 234, 0.4);
  background: rgba(1, 110, 234, 0.04);
  grid-column: 1 / -1;
}

.workflow-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(1, 110, 234, 0.15);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--blue-light);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.workflow-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 8px;
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
}

.workflow-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.workflow-card code {
  font-size: 0.78rem;
  color: var(--text-muted);
  word-break: break-all;
  white-space: pre-wrap;
}

/* === Setup Steps === */
.setup-steps {
  max-width: 640px;
  margin: 0 auto;
}

.setup-step {
  display: flex;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}

.setup-step:last-child {
  border-bottom: none;
}

.step-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  border-radius: 50%;
}

.step-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.step-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.step-content code {
  display: inline-block;
  margin-top: 4px;
  word-break: break-all;
  white-space: pre-wrap;
}

.code-block {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-top: 8px;
  overflow-x: auto;
}

.code-block pre {
  margin: 0;
}

.code-block code {
  background: none;
  padding: 0;
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--text-secondary);
  white-space: pre;
  word-break: normal;
}

/* === Strategy Grid === */
.strategy-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.strategy-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
}

.strategy-card:hover {
  border-color: rgba(1, 110, 234, 0.3);
  transform: translateY(-2px);
}

.strategy-event {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.strategy-action {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--blue-light);
}

/* === Ecosystem Actions Grid === */
.eco-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.eco-action-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.eco-action-card:hover {
  border-color: rgba(1, 110, 234, 0.3);
  transform: translateY(-2px);
}

.eco-action-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
}

.eco-action-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
  line-height: 1.6;
}

.eco-action-card a {
  font-size: 0.85rem;
  font-weight: 600;
}

/* === Footer === */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 56px 0 32px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 40px;
}

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

.footer-logo {
  font-size: 1.25rem;
  font-weight: 700;
  display: block;
  margin-bottom: 8px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 64px;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer-bottom a {
  color: var(--text-muted);
}

.footer-bottom a:hover {
  color: var(--text-secondary);
}

/* === Responsive === */
@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .eco-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .strategy-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .eco-actions-grid {
    grid-template-columns: 1fr;
  }

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

  .workflow-card-primary {
    grid-column: auto;
  }

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

@media (max-width: 768px) {
  .js .nav-toggle {
    display: flex;
  }

  .js .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    gap: 16px;
  }

  .js .nav-links.active {
    display: flex;
  }

  .js .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .js .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .js .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .pipeline-fan-items {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    gap: 32px;
  }

  .footer-links {
    gap: 40px;
  }

  .section {
    padding: 48px 0;
  }

  .hero {
    padding: 88px 24px 48px;
  }

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

  .hero-tagline {
    margin-bottom: 24px;
  }

  .hero-actions {
    margin-bottom: 20px;
  }

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

  .section-subtitle {
    margin-bottom: 32px;
  }
}

@media (max-width: 480px) {
  .features-grid,
  .eco-grid,
  .strategy-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 40px 0;
  }

  .hero {
    padding: 80px 20px 36px;
  }

  .hero h1 {
    font-size: 1.85rem;
    margin-bottom: 12px;
  }

  .hero-tagline {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
  }

  .hero-badge {
    margin-bottom: 16px;
  }

  .section-subtitle {
    margin-bottom: 28px;
  }

  .btn {
    width: 100%;
    justify-content: center;
    padding: 12px 24px;
  }

  .feature-card {
    padding: 24px 20px;
  }

  .setup-step {
    padding: 20px 0;
    gap: 16px;
  }

  .step-number {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .pipeline-step {
    padding: 16px;
    gap: 16px;
  }

  .pipeline-number {
    width: 36px;
    height: 36px;
    font-size: 0.85rem;
  }

  .footer {
    padding: 36px 0 24px;
  }

  .footer-inner {
    gap: 24px;
    margin-bottom: 24px;
  }

  .footer-links {
    flex-direction: column;
    gap: 24px;
  }
}
