/*
Theme Name: OpenClaw Theme
Theme URI: https://openclaw.ai
Author: OpenClaw Team
Description: A modern, tech-focused theme for OpenClaw documentation site
Version: 1.0.0
License: MIT
Text Domain: openclaw-theme
*/

/* ================================
   CSS Variables & Reset
================================ */
:root {
  --color-bg: #0a0a0f;
  --color-bg-secondary: #12121a;
  --color-bg-card: #1a1a24;
  --color-text: #e4e4e7;
  --color-text-muted: #71717a;
  --color-primary: #10b981;
  --color-primary-dark: #059669;
  --color-accent: #06b6d4;
  --color-border: #27272a;
  --color-gradient-start: #10b981;
  --color-gradient-end: #06b6d4;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Fira Code', 'SF Mono', monospace;
  --radius: 12px;
  --radius-sm: 6px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px rgba(16, 185, 129, 0.15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ================================
   Typography
================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p { margin-bottom: 1rem; }

code {
  font-family: var(--font-mono);
  background: var(--color-bg-card);
  padding: 0.2em 0.4em;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
}

/* ================================
   Layout
================================ */
.container {
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ================================
   Header & Navigation
================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
}

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

.site-logo {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.site-logo svg {
  width: 32px;
  height: 32px;
}

.main-nav {
  display: flex;
  gap: 16px;
}

.main-nav a {
  color: var(--color-text-muted);
  padding: 16px 32px;
  border-radius: var(--radius-sm);
  font-size: 1.425rem;
  font-weight: 500;
  transition: all 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--color-text);
  background: var(--color-bg-card);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 768px) {
  .main-nav {
    position: fixed;
    top: 96px;
    left: 0;
    right: 0;
    background: var(--color-bg-secondary);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--color-border);
    display: none;
  }
  
  .main-nav.open {
    display: flex;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
}

/* ================================
   Hero Section
================================ */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--color-primary);
  margin-bottom: 24px;
}

.hero h1 {
  background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto 32px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
  color: #000;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  color: #000;
}

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

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

/* ================================
   Features Section
================================ */
.features {
  padding: 100px 24px;
  background: var(--color-bg-secondary);
}

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

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

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

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

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

.feature-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.1);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.feature-card h3 {
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--color-text-muted);
  margin-bottom: 0;
}

/* ================================
   Quick Start Section
================================ */
.quickstart {
  padding: 100px 24px;
}

.code-window {
  max-width: 700px;
  margin: 0 auto;
  background: var(--color-bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
}

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

.code-dot.red { background: #ff5f57; }
.code-dot.yellow { background: #ffbd2e; }
.code-dot.green { background: #28ca42; }

.code-title {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.code-body {
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.8;
  overflow-x: auto;
}

.code-body code {
  background: none;
  padding: 0;
}

.code-comment { color: var(--color-text-muted); }
.code-command { color: var(--color-primary); }

/* ================================
   Page Content
================================ */
.page-content {
  padding: 120px 24px 80px;
  min-height: 100vh;
}

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

.page-header h1 {
  margin-bottom: 16px;
}

.page-header p {
  color: var(--color-text-muted);
}

.content-section {
  margin-bottom: 48px;
}

.content-section h2 {
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
}

.content-section h3 {
  margin: 24px 0 12px;
  color: var(--color-text);
}

.content-section ul {
  margin-left: 24px;
  margin-bottom: 16px;
}

.content-section li {
  margin-bottom: 8px;
  color: var(--color-text-muted);
}

/* ================================
   Community Section
================================ */
.community {
  padding: 100px 24px;
  background: var(--color-bg-secondary);
}

.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.community-card {
  padding: 32px;
  background: var(--color-bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  text-align: center;
  transition: all 0.3s;
}

.community-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary);
}

.community-card h3 {
  margin-bottom: 12px;
}

.community-card p {
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

/* ================================
   Footer
================================ */
.site-footer {
  padding: 60px 24px 40px;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

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

.footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 24px;
}

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

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

/* ================================
   Utility Classes
================================ */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }

/* ================================
   Animations
================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.6s ease-out;
}
/* ========== Practice Page Cards ========== */
.practice-intro {
    margin-bottom: 40px;
}

.practice-intro p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

.practice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.practice-card {
    padding: 28px;
    background: var(--color-bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    transition: all 0.3s;
    text-decoration: none;
    display: block;
    position: relative;
}

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

.practice-card .card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.practice-card .icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.practice-card .card-title {
    flex: 1;
}

.practice-card h3 {
    margin: 0 0 8px 0;
    color: var(--color-text);
    font-size: 1.2rem;
}

.practice-card .meta {
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.practice-card .meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.practice-card p {
    color: var(--color-text-muted);
    margin-bottom: 16px;
    line-height: 1.6;
}

.practice-card .tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.practice-card .tag {
    padding: 4px 12px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--color-primary);
}

.practice-card .arrow {
    position: absolute;
    right: 24px;
    bottom: 24px;
    color: var(--color-text-muted);
    transition: all 0.2s;
}

.practice-card:hover .arrow {
    color: var(--color-primary);
    transform: translateX(4px);
}
/* ================================================================
   HOME PAGE - SAAS LANDING PAGE STYLE
   ================================================================ */

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

.hero-saas::before {
  content: '';
  position: absolute;
  top: -200px;
  right: -200px;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.hero-saas-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  width: 100%;
}

.hero-saas-left {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

/* Install Box */
.install-box {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 28px;
  max-width: 400px;
}

.install-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.install-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
}

.copy-btn:hover {
  color: var(--color-primary);
  background: rgba(16, 185, 129, 0.1);
}

.install-command {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--color-primary);
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Code Demo Window */
.hero-saas-right {
  position: relative;
}

.code-demo-window {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.code-demo-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-border);
}

.code-title {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.code-demo-body {
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.9;
}

.code-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}

.prompt {
  color: var(--color-primary);
  flex-shrink: 0;
}

.typing-text {
  color: var(--color-text);
}

.code-output {
  color: var(--color-text-muted);
  padding-left: 24px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.output-success {
  color: #22c55e;
}

.status-output {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--color-bg-secondary);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

.status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.status-icon {
  font-size: 1rem;
}

/* ================================================================
   BENTO GRID - Feature Cards
   ================================================================ */

.features-bento {
  padding: 100px 24px;
  background: var(--color-bg-secondary);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.bento-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

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

/* Large Card: spans 2 columns, 2 rows */
.bento-large {
  grid-column: span 2;
  grid-row: span 1;
  display: flex;
  flex-direction: column;
}

/* Medium Cards: span 1 column */
.bento-medium {
  grid-column: span 1;
}

/* Small Cards: span 1 column in a tighter layout */
.bento-small {
  padding: 20px;
}

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

.bento-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.bento-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0;
}

.bento-models {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 16px;
}

.model-tag {
  padding: 4px 12px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--color-primary);
}

/* Responsive Bento */
@media (max-width: 900px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .bento-large {
    grid-column: span 2;
  }
}

@media (max-width: 600px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
  
  .bento-large,
  .bento-medium {
    grid-column: span 1;
  }
}

/* ================================================================
   PROJECT SPOTLIGHT
   ================================================================ */

.spotlight {
  padding: 100px 24px;
}

.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 1200px;
  margin: 0 auto;
}

.spotlight-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
  position: relative;
  display: flex;
  flex-direction: column;
}

.spotlight-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.spotlight-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.spotlight-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--color-text);
}

.spotlight-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  flex: 1;
}

.spotlight-meta {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  font-size: 0.85rem;
}

.difficulty {
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 500;
}

.difficulty.beginner {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.difficulty.intermediate {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.time {
  color: var(--color-text-muted);
}

.spotlight-arrow {
  position: absolute;
  right: 24px;
  bottom: 24px;
  font-size: 1.5rem;
  color: var(--color-text-muted);
  transition: all 0.2s;
}

.spotlight-card:hover .spotlight-arrow {
  color: var(--color-primary);
  transform: translateX(4px);
}

.spotlight-more {
  text-align: center;
  margin-top: 48px;
}

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

@media (max-width: 600px) {
  .spotlight-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-saas-container {
    grid-template-columns: 1fr;
  }
  
  .hero-saas-right {
    order: -1;
  }
  
  .code-demo-window {
    max-width: 100%;
  }
}

/* ================================================================
   COMMUNITY CTA
   ================================================================ */

.community-cta {
  padding: 80px 24px;
  background: linear-gradient(180deg, var(--color-bg-secondary) 0%, var(--color-bg) 100%);
}

.cta-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

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

.cta-content p {
  color: var(--color-text-muted);
  margin-bottom: 28px;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ================================================================
   ANIMATIONS
   ================================================================ */

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.code-demo-window {
  animation: float 6s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.2); }
  50% { box-shadow: 0 0 20px 10px rgba(16, 185, 129, 0.1); }
}

.install-box {
  animation: pulse-glow 3s ease-in-out infinite;
}
