/* ============================================
   GUIDE SECTION — Tree Layout Styles
   ============================================ */

/* === HERO SECTION === */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-3xl) 0;
  position: relative;
  overflow: hidden;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--accent-green-dim);
  border: 1px solid rgba(0, 255, 157, 0.2);
  color: var(--accent-green);
  padding: 6px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: var(--space-xl);
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(0, 255, 157, 0.1); }
  50% { box-shadow: 0 0 20px rgba(0, 255, 157, 0.25); }
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  margin-bottom: var(--space-lg);
  line-height: 1.15;
}

.hero-title .glow {
  color: var(--accent-green);
  text-shadow: 0 0 30px rgba(0, 255, 157, 0.3);
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto var(--space-xl);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: var(--space-2xl);
  justify-content: center;
  margin-top: var(--space-2xl);
}

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

.hero-stat .stat-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-green);
  font-family: 'JetBrains Mono', monospace;
}

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

/* Floating particles effect */
.hero-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.hero-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--accent-green);
  border-radius: 50%;
  opacity: 0;
  animation: float-particle linear infinite;
}

@keyframes float-particle {
  0% {
    opacity: 0;
    transform: translateY(100vh) scale(0);
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
    transform: translateY(-20vh) scale(1);
  }
}

/* === GUIDE TREE === */
.guide-tree {
  position: relative;
  padding-left: 0;
}

/* Main trunk line */
.guide-tree::before {
  content: '';
  position: absolute;
  left: 28px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(
    to bottom,
    var(--accent-green),
    var(--accent-cyan),
    var(--accent-purple),
    var(--accent-green)
  );
  opacity: 0.3;
  border-radius: 1px;
}

/* === STEP NODE === */
.step-node {
  position: relative;
  margin-bottom: var(--space-xl);
  padding-left: 68px;
}

/* Node dot on the trunk line */
.step-node::before {
  content: '';
  position: absolute;
  left: 21px;
  top: 22px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 12px var(--accent-green-glow);
  z-index: 2;
  transition: all var(--transition-base);
}

/* Horizontal connector from trunk to card */
.step-node::after {
  content: '';
  position: absolute;
  left: 37px;
  top: 29px;
  width: 24px;
  height: 2px;
  background: var(--accent-green);
  opacity: 0.3;
}

.step-node.active::before {
  background: var(--accent-cyan);
  box-shadow: 0 0 18px rgba(0, 212, 255, 0.4);
  transform: scale(1.2);
}

/* === STEP CARD === */
.step-card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.step-card:hover {
  border-color: rgba(0, 255, 157, 0.15);
}

.step-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-xl);
  cursor: default;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--accent-green-dim);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.step-title-block {
  flex: 1;
}

.step-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.step-summary {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* === BRANCH PILLS CONTAINER === */
.branch-pills {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  padding: 0 var(--space-xl) var(--space-md);
}

/* === CHILD NODES (details/summary for info, slide panels for branches) === */
.step-children {
  border-top: 1px solid var(--border-subtle);
}

/* Info expandable (details/summary) */
.info-expand {
  border-bottom: 1px solid var(--border-subtle);
}

.info-expand:last-child {
  border-bottom: none;
}

.info-expand summary {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-xl);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  list-style: none;
}

.info-expand summary::-webkit-details-marker {
  display: none;
}

.info-expand summary::before {
  content: '▸';
  color: var(--accent-green);
  font-size: 0.8rem;
  transition: transform var(--transition-fast);
  display: inline-block;
  width: 16px;
  flex-shrink: 0;
}

.info-expand[open] summary::before {
  transform: rotate(90deg);
}

.info-expand summary:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}

.info-expand summary .info-icon {
  font-size: 1rem;
}

.info-content {
  padding: 0 var(--space-xl) var(--space-lg);
  padding-left: calc(var(--space-xl) + 24px);
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.8;
  animation: slide-down 0.3s ease;
}

@keyframes slide-down {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.info-content p {
  margin-bottom: var(--space-sm);
}

.info-content ul {
  padding-left: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.info-content li {
  margin-bottom: 4px;
}

.info-content .terminal {
  margin: var(--space-sm) 0 var(--space-md);
}

/* === BRANCH PANEL (slides open when pill clicked) === */
.branch-panel {
  display: none;
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-lg) var(--space-xl);
  animation: slide-down 0.3s ease;
}

.branch-panel.open {
  display: block;
}

.branch-panel-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  font-weight: 700;
  font-size: 1rem;
}

.branch-panel-content {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.8;
}

.branch-panel-content p {
  margin-bottom: var(--space-sm);
}

.branch-panel-content ul {
  padding-left: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.branch-panel-content li {
  margin-bottom: 4px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .guide-tree::before {
    left: 16px;
  }

  .step-node {
    padding-left: 46px;
  }

  .step-node::before {
    left: 10px;
    top: 18px;
    width: 13px;
    height: 13px;
  }

  .step-node::after {
    left: 23px;
    top: 24px;
    width: 18px;
  }

  .step-card-header {
    padding: var(--space-md);
  }

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

  .branch-pills {
    padding: 0 var(--space-md) var(--space-sm);
  }

  .info-expand summary {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.85rem;
  }

  .info-content {
    padding: 0 var(--space-md) var(--space-md);
    padding-left: calc(var(--space-md) + 20px);
  }

  .branch-panel {
    padding: var(--space-md);
  }

  .hero-stats {
    gap: var(--space-lg);
  }

  .hero-stat .stat-value {
    font-size: 1.3rem;
  }
}
