/* =============================================
   FSB Showcase - Home Page Styles
   ============================================= */

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: var(--nav-height);
  position: relative;
  overflow: hidden;
}

@keyframes heroGlow {
  0%, 100% {
    transform: scale(1) translate(0, 0);
    opacity: 1;
  }
  33% {
    transform: scale(1.08) translate(2%, -3%);
    opacity: 0.85;
  }
  66% {
    transform: scale(0.95) translate(-2%, 2%);
    opacity: 0.9;
  }
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 20%, rgba(255, 107, 53, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(255, 140, 66, 0.12) 0%, transparent 60%);
  pointer-events: none;
  animation: heroGlow 12s ease-in-out infinite;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  padding: 48px 24px;
  position: relative;
  z-index: 1;
}

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

.hero h1 .highlight {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

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

/* Terminal mockup in hero */
.terminal-mockup {
  max-width: 640px;
  margin: 0 auto;
  background: #0d1117;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg), 0 0 40px rgba(255, 107, 53, 0.08);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.terminal-body {
  padding: 20px 24px;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
  min-height: 80px;
}

.terminal-prompt {
  color: var(--primary);
  margin-right: 8px;
}

.terminal-text {
  color: var(--text-secondary);
}

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 18px;
  background: var(--primary);
  vertical-align: text-bottom;
  animation: cursorBlink 1s step-end infinite;
}

@keyframes cursorBlink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* --- Features Grid --- */
.features {
  background: var(--bg-body);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  transition: all var(--transition-base);
}

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

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 107, 53, 0.1);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 1.25rem;
  color: var(--primary);
}

.feature-card h3 {
  font-size: 1.125rem;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.9rem;
  line-height: 1.6;
}

/* --- Competitor Comparison --- */
.comparison {
  background: var(--bg-card);
}

.comparison .section-header h2 {
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.competitors-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.competitor-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  transition: all var(--transition-base);
  opacity: 0.7;
}

.competitor-card:hover {
  opacity: 1;
  border-color: var(--border-hover);
}

.competitor-logo {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.competitor-logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: invert(1);
  opacity: 0.7;
}

.competitor-logo img[alt="OpenClaw"] {
  filter: grayscale(1) brightness(2);
}

[data-theme="light"] .competitor-logo img {
  filter: none;
  opacity: 0.7;
}

[data-theme="light"] .competitor-logo img[alt="OpenClaw"] {
  filter: grayscale(1) brightness(0.4);
  opacity: 0.7;
}

.competitor-logo svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
  opacity: 0.7;
}

.competitor-card h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.competitor-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  padding: 3px 10px;
  border-radius: 10px;
  letter-spacing: 0.02em;
}

.competitor-tag i {
  margin-right: 4px;
  font-size: 0.65rem;
}

/* FSB highlight card */
.fsb-highlight-card {
  background: var(--bg-elevated);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  text-align: center;
  max-width: 700px;
  margin: 0 auto 32px;
  box-shadow: var(--shadow-glow), 0 0 40px rgba(255, 107, 53, 0.08);
}

.fsb-highlight-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 12px;
}

.fsb-highlight-header img {
  width: 36px;
  height: 36px;
}

.fsb-highlight-header h3 {
  font-size: 1.5rem;
  font-weight: 800;
}

.fsb-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: var(--primary);
  padding: 4px 12px;
  border-radius: 10px;
  letter-spacing: 0.02em;
}

.fsb-tag i {
  margin-right: 4px;
}

.fsb-highlight-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.fsb-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
}

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

.fsb-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 4px;
}

.fsb-stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.fsb-stat-vs {
  color: var(--text-muted);
  font-style: italic;
}

/* MCP callout */
.mcp-callout {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  max-width: 700px;
  margin: 0 auto;
}

.mcp-callout-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 107, 53, 0.1);
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-size: 1.1rem;
}

.mcp-callout-content h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

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

/* --- How It Works --- */
.how-it-works {
  background: var(--bg-card);
}

.steps-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  max-width: 260px;
  padding: 0 20px;
}

.step-number {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-gradient);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: 50%;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.step-arrow {
  display: flex;
  align-items: center;
  padding-top: 24px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.step-arrow svg {
  width: 32px;
  height: 32px;
}

.step-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

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

/* --- AI Providers --- */
.providers {
  background: var(--bg-body);
}

.providers-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.provider-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  text-align: center;
  transition: all var(--transition-base);
}

.provider-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.provider-card.recommended {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.provider-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.provider-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.provider-icon svg {
  width: 40px;
  height: 40px;
  fill: currentColor;
}

.provider-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: invert(1);
}

.provider-icon img[alt="OpenRouter"] {
  filter: none;
}

[data-theme="light"] .provider-icon img {
  filter: none;
}

[data-theme="light"] .provider-icon img[alt="OpenRouter"] {
  filter: invert(1);
}

.provider-card h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

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

.providers-note {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.providers-note strong {
  color: var(--primary);
}

/* --- Open Source CTA --- */
.cta-section {
  background: var(--bg-card);
  text-align: center;
}

.cta-section h2 {
  margin-bottom: 12px;
}

.cta-section p {
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

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

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

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

@media (max-width: 768px) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--nav-height) + 40px);
    padding-bottom: 40px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }

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

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

  .competitors-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .fsb-highlight-card {
    padding: 28px 20px;
  }

  .fsb-stats {
    flex-direction: column;
    gap: 20px;
  }

  .mcp-callout {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .steps-row {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .step-arrow {
    transform: rotate(90deg);
    padding-top: 0;
  }

  .step-item {
    max-width: 100%;
  }

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

  .terminal-mockup {
    margin: 0 8px;
  }

  .terminal-body {
    font-size: 0.8rem;
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .competitors-row {
    grid-template-columns: 1fr;
  }

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

  .provider-card {
    padding: 20px 16px;
  }

  .competitor-card {
    padding: 16px 12px;
  }

  .fsb-highlight-card {
    padding: 24px 16px;
  }

  .fsb-stat-value {
    font-size: 1.25rem;
  }

  .mcp-callout {
    padding: 20px;
  }
}
