/* ============================================
   HumanPipe — style.css
   Dark theme, modern SaaS, responsive
   ============================================ */

/* --- Reset & Base --- */
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font: inherit; border: none; outline: none; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { line-height: 1.2; color: var(--text-bright); }

/* --- Utility --- */
.gradient-text {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  border: none;
}
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--text-bright);
  background: rgba(99, 102, 241, 0.08);
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.85rem;
  background: var(--gradient);
  color: #fff;
  border-radius: var(--radius-sm);
}
.btn-sm:hover {
  opacity: 0.9;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all 0.3s ease;
  background: transparent;
}

.nav.scrolled {
  background: rgba(10, 14, 26, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-bright);
}

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

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-dim);
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--text-bright);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(99, 102, 241, 0.15) 0%, rgba(6, 182, 212, 0.08) 40%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--accent2);
  border: 1px solid rgba(6, 182, 212, 0.3);
  background: rgba(6, 182, 212, 0.08);
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto 36px;
}

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

.hero-code {
  max-width: 560px;
  margin: 0 auto;
  text-align: left;
}

/* --- Code Windows --- */
.code-window {
  background: #0d1117;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.code-dots {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.code-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.code-dots span:nth-child(1) { background: #ef4444; }
.code-dots span:nth-child(2) { background: #f59e0b; }
.code-dots span:nth-child(3) { background: #10b981; }

.code-title {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 12px;
  font-size: 0.75rem;
  color: var(--text-dim);
  pointer-events: none;
}

.code-window {
  position: relative;
}

.code-window pre {
  padding: 20px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: #e6edf3;
}

.code-window code {
  font-family: var(--mono);
}

.code-comment { color: #8b949e; }
.code-kw { color: #ff7b72; }
.code-fn { color: #d2a8ff; }
.code-str { color: #a5d6ff; }
.code-num { color: #79c0ff; }
.code-prop { color: #7ee787; }

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

.section-alt {
  background: rgba(17, 24, 39, 0.4);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto;
}

/* --- How It Works: Flow Pipeline --- */
.flow-pipeline {
  position: relative;
  margin-bottom: 64px;
}

.flow-line {
  display: none;
}

.flow-steps {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.flow-step {
  text-align: center;
  padding: 24px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s ease;
  position: relative;
}

.flow-step::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -16px;
  width: 16px;
  height: 2px;
  background: var(--gradient);
  transform: translateY(-50%);
}

.flow-step:last-child::after {
  display: none;
}

.flow-step:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.flow-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 12px;
  color: var(--accent);
}
.flow-icon svg {
  width: 24px;
  height: 24px;
}

.flow-label {
  margin-bottom: 8px;
}

.flow-label code {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent2);
  background: rgba(6, 182, 212, 0.1);
  padding: 3px 8px;
  border-radius: 4px;
}

.flow-desc {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* --- Flow Diagram --- */
.flow-visual {
  max-width: 800px;
  margin: 0 auto;
}

.flow-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.flow-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
}

.flow-node.humanpipe {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.08);
}

.flow-node-icon {
  color: var(--text-dim);
}
.flow-node-icon svg {
  width: 28px;
  height: 28px;
}
.flow-node.humanpipe .flow-node-icon {
  color: var(--accent);
}

.flow-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.flow-arrow svg {
  width: 60px;
  height: 24px;
}
.flow-arrow span {
  font-size: 0.7rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.flow-statuses {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
}

.status-badge.pending { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.status-badge.accepted { background: rgba(99, 102, 241, 0.15); color: var(--accent); }
.status-badge.progress { background: rgba(6, 182, 212, 0.15); color: var(--accent2); }
.status-badge.submitted { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.status-badge.completed { background: rgba(16, 185, 129, 0.15); color: var(--success); }

.status-arrow {
  color: var(--text-dim);
  font-size: 0.8rem;
}

/* --- Tabs --- */
.tabs {
  max-width: 900px;
  margin: 0 auto;
}

.tab-buttons {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 4px;
  border: 1px solid var(--border);
  overflow-x: auto;
}

.tab-btn {
  flex: 1;
  padding: 10px 16px;
  background: none;
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.tab-btn.active {
  background: var(--gradient);
  color: #fff;
}

.tab-btn:hover:not(.active) {
  color: var(--text-bright);
  background: rgba(255, 255, 255, 0.05);
}

.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}

/* --- Security Section --- */
.security-shield-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.security-shield {
  width: 56px;
  height: 56px;
  filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.3));
}

.security-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.security-card {
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.security-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.security-card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 10px;
  margin-bottom: 16px;
  color: var(--accent);
}
.security-card-icon svg {
  width: 22px;
  height: 22px;
}

.security-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.security-card p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* --- Marketplace --- */
.marketplace-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.feature-item {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.feature-item:hover {
  border-color: rgba(99, 102, 241, 0.3);
}

.feature-item + .feature-item {
  margin-top: 12px;
}

.feature-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 182, 212, 0.1);
  border-radius: 10px;
  color: var(--accent2);
}
.feature-icon svg {
  width: 20px;
  height: 20px;
}

.feature-item h4 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.feature-item p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* --- Use Cases --- */
.usecases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.usecase-card {
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.usecase-card:hover {
  border-color: rgba(6, 182, 212, 0.4);
  transform: translateY(-2px);
}

.usecase-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 182, 212, 0.1);
  border-radius: 10px;
  margin-bottom: 16px;
  color: var(--accent2);
}
.usecase-icon svg {
  width: 22px;
  height: 22px;
}

.usecase-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.usecase-card p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* --- Task Types --- */
.task-types-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.task-type-card {
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.task-type-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.3);
}

.task-type-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

.task-type-badge.standard { background: rgba(99, 102, 241, 0.15); color: var(--accent); }
.task-type-badge.live { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.task-type-badge.review { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.task-type-badge.creative { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }

.task-type-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.task-type-card p {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.patterns-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.pattern-item {
  text-align: center;
  padding: 24px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.pattern-item:hover {
  border-color: rgba(6, 182, 212, 0.3);
}

.pattern-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 182, 212, 0.1);
  border-radius: 10px;
  color: var(--accent2);
}
.pattern-icon svg {
  width: 22px;
  height: 22px;
}

.pattern-item h4 {
  font-size: 0.95rem;
  margin-bottom: 6px;
}

.pattern-item p {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* --- Pricing --- */
.pricing-card {
  max-width: 560px;
  margin: 0 auto;
}

.pricing-inner {
  text-align: center;
  padding: 48px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.pricing-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
}

.pricing-badge {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent);
  margin-bottom: 20px;
}

.pricing-inner h3 {
  font-size: 1.6rem;
  margin-bottom: 12px;
}

.pricing-inner > p {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 28px;
  line-height: 1.6;
}

.waitlist-form {
  margin-bottom: 0;
}

.form-row {
  display: flex;
  gap: 8px;
  max-width: 420px;
  margin: 0 auto;
}

.form-row input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
}

.form-row input::placeholder {
  color: var(--text-dim);
}

.form-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.form-note {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 12px;
}

.waitlist-success {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.waitlist-success svg {
  width: 40px;
  height: 40px;
}

.waitlist-success p {
  color: var(--success);
  font-weight: 600;
}

/* --- Footer --- */
.footer {
  padding: 60px 0 32px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 12px;
  line-height: 1.6;
}

.footer-links h4 {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
}

.footer-links a {
  display: block;
  font-size: 0.88rem;
  color: var(--text-dim);
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text-bright);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* --- Animations --- */
.anim-fade {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.anim-fade.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children in grids */
.security-grid .anim-fade:nth-child(2) { transition-delay: 0.05s; }
.security-grid .anim-fade:nth-child(3) { transition-delay: 0.1s; }
.security-grid .anim-fade:nth-child(4) { transition-delay: 0.15s; }
.security-grid .anim-fade:nth-child(5) { transition-delay: 0.2s; }
.security-grid .anim-fade:nth-child(6) { transition-delay: 0.25s; }
.security-grid .anim-fade:nth-child(7) { transition-delay: 0.3s; }
.security-grid .anim-fade:nth-child(8) { transition-delay: 0.35s; }

.usecases-grid .anim-fade:nth-child(2) { transition-delay: 0.05s; }
.usecases-grid .anim-fade:nth-child(3) { transition-delay: 0.1s; }
.usecases-grid .anim-fade:nth-child(4) { transition-delay: 0.15s; }
.usecases-grid .anim-fade:nth-child(5) { transition-delay: 0.2s; }
.usecases-grid .anim-fade:nth-child(6) { transition-delay: 0.25s; }

/* --- Responsive --- */
@media (max-width: 1024px) {
  .flow-steps {
    grid-template-columns: repeat(3, 1fr);
  }
  .flow-step:nth-child(3)::after,
  .flow-step:last-child::after {
    display: none;
  }

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

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

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

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

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 14, 26, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 20px 24px;
    flex-direction: column;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .hero {
    padding: 100px 0 60px;
    min-height: auto;
  }

  .section {
    padding: 64px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .flow-steps {
    grid-template-columns: 1fr 1fr;
  }

  .flow-step::after {
    display: none;
  }

  .flow-diagram {
    flex-direction: column;
  }

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

  .flow-statuses {
    gap: 4px;
  }

  .status-arrow {
    display: none;
  }

  .status-badge {
    font-size: 0.65rem;
    padding: 3px 8px;
  }

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

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

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

  .task-types-grid,
  .patterns-grid {
    grid-template-columns: 1fr;
  }

  .tab-buttons {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab-btn {
    flex: 0 0 auto;
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  .form-row {
    flex-direction: column;
  }

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

  .pricing-inner {
    padding: 32px 24px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

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

  .flow-steps {
    grid-template-columns: 1fr;
  }

  .code-window pre {
    font-size: 0.72rem;
    padding: 14px;
  }
}
