/* ========================================
   ezstack — Landing Page Styles
   ======================================== */

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

:root {
  --bg: #09090b;
  --surface: #18181b;
  --surface-hover: #1f1f23;
  --border: #27272a;
  --border-light: #3f3f46;
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-dim: #71717a;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.15);
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
  --cyan: #06b6d4;
  --purple: #a855f7;
  --terminal-bg: #0c0c0e;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Menlo, Consolas, monospace;
  --container: 1140px;
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--surface);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  color: var(--cyan);
}

pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
  overflow-x: auto;
}

pre code {
  background: none;
  padding: 0;
  font-size: inherit;
  color: var(--text);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.section-sub {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.125rem;
  max-width: 560px;
  margin: 0 auto 3.5rem;
}

/* Animations */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   Navigation
   ======================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

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

.nav-logo {
  vertical-align: middle;
  margin-right: 0.5rem;
  border-radius: 4px;
}

.nav-brand {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

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

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

.nav-github {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

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

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

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

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

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Nav Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
  transition: color 0.2s;
}

.nav-dropdown-toggle:hover,
.nav-dropdown.open .nav-dropdown-toggle {
  color: var(--text);
}

.nav-dropdown-toggle svg {
  transition: transform 0.2s;
}

.nav-dropdown.open .nav-dropdown-toggle svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.75rem);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(22, 22, 26, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem;
  min-width: 180px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 100;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: flex;
  flex-direction: column;
}

.nav-dropdown-menu a {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.nav-dropdown-menu a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

/* ========================================
   Hero
   ======================================== */

.hero {
  position: relative;
  padding: 10rem 0 4rem;
  text-align: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

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

.hero-badge {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 100px;
  padding: 0.375rem 1rem;
  margin-bottom: 2rem;
  transition: background 0.2s, border-color 0.2s;
}

.hero-badge:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  color: var(--accent);
}

.hero h1 {
  font-size: 4rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

/* Install command */
.install-cmd {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--terminal-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  max-width: 100%;
}

.install-prompt {
  color: var(--cyan);
  user-select: none;
  flex-shrink: 0;
}

.install-text {
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.375rem 0.625rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  flex-shrink: 0;
  white-space: nowrap;
}

.copy-btn:hover {
  color: var(--text);
  border-color: var(--border-light);
  background: var(--surface-hover);
}

.copy-btn.copied {
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.3);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--border-light);
  color: var(--text);
}

/* ========================================
   Terminal Demo
   ======================================== */

.terminal-section {
  padding: 0 0 6rem;
}

.terminal {
  background: var(--terminal-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 720px;
  margin: 0 auto;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 20px 50px -12px rgba(0, 0, 0, 0.5);
}

.terminal-header {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

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

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

.terminal-title {
  flex: 1;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-right: 42px; /* balance the dots */
}

.terminal-body {
  padding: 1.25rem 1.5rem;
  height: 280px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.7;
  position: relative;
}

.terminal-content {
  white-space: pre-wrap;
  word-break: break-word;
}

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

@keyframes blink {
  50% { opacity: 0; }
}

/* Terminal syntax colors */
.t-prompt { color: var(--cyan); }
.t-cmd { color: var(--green); }
.t-arg { color: var(--text); }
.t-flag { color: var(--yellow); }
.t-str { color: var(--yellow); }
.t-dim { color: var(--text-dim); }
.t-branch { color: var(--purple); }
.t-success { color: var(--green); }
.t-info { color: var(--accent); }
.t-url { color: var(--text-secondary); }

/* ========================================
   Features
   ======================================== */

.features {
  padding: 6rem 0;
}

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

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.3s, transform 0.3s;
}

.feature-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--accent-glow);
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.feature-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

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

/* ========================================
   How It Works
   ======================================== */

.how-it-works {
  padding: 6rem 0;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(24, 24, 27, 0.3) 50%, var(--bg) 100%);
}

.steps {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.step h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step > p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 1.25rem;
}

.step-code {
  background: var(--terminal-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
}

.step-connector {
  width: 2px;
  height: 32px;
  background: var(--border);
  margin: 0 auto;
}

/* Code syntax in steps */
.c-prompt { color: var(--cyan); user-select: none; }
.c-cmd { color: var(--green); }
.c-flag { color: var(--yellow); }
.c-str { color: var(--yellow); }
.c-dim { color: var(--text-dim); }
.c-green { color: var(--green); }
.c-comment { color: var(--text-dim); }

/* ========================================
   Commands (Accordion)
   ======================================== */

.commands {
  padding: 6rem 0;
}

.accordion {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.accordion-header {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 1rem 1.25rem;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  text-align: left;
}

.accordion-header:hover {
  background: var(--surface-hover);
}

.accordion-label {
  flex: 1;
}

.accordion-count {
  color: var(--text-dim);
  font-size: 0.8125rem;
  font-weight: 400;
  margin-right: 0.75rem;
}

.accordion-chevron {
  flex-shrink: 0;
  transition: transform 0.3s;
  color: var(--text-dim);
}

.accordion-item.open .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.accordion-item.open .accordion-body {
  max-height: 800px;
}

.cmd-table {
  width: 100%;
  border-collapse: collapse;
  padding: 0 1.25rem;
}

.cmd-table tbody tr {
  border-top: 1px solid var(--border);
}

.cmd-table td {
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  vertical-align: top;
}

.cmd-name {
  white-space: nowrap;
  width: 200px;
}

.cmd-name code {
  color: var(--text);
  background: none;
  padding: 0;
  font-size: 0.875rem;
  font-weight: 500;
}

.cmd-alias {
  color: var(--text-dim);
  font-size: 0.75rem;
  margin-left: 0.375rem;
}

.cmd-detail {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.cmd-detail h4 {
  color: var(--text);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.cmd-detail p {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.cmd-detail ul {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
}

.cmd-detail li {
  margin-bottom: 0.25rem;
}

.cmd-detail code {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  font-size: 0.8125rem;
}

/* ========================================
   Installation
   ======================================== */

.install {
  padding: 6rem 0;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(24, 24, 27, 0.3) 50%, var(--bg) 100%);
}

.install-tabs {
  max-width: 640px;
  margin: 0 auto 3rem;
}

.tab-buttons {
  display: flex;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  overflow: hidden;
  background: var(--surface);
}

.tab-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  border-right: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.tab-btn:last-child {
  border-right: none;
}

.tab-btn:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.tab-btn.active {
  color: var(--text);
  background: var(--terminal-bg);
}

.tab-panels {
  position: relative;
}

.tab-panel {
  display: none;
  background: var(--terminal-bg);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 1.25rem 1.5rem;
  position: relative;
}

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

.panel-copy {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}

/* Install extras */
.install-extras {
  max-width: 640px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.install-shell,
.install-reqs {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.install-shell h3,
.install-reqs h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.recommended-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--green);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 100px;
  padding: 0.125rem 0.5rem;
}

.install-shell p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.install-shell pre {
  background: var(--terminal-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
}

.install-reqs ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.install-reqs li {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.install-reqs li::before {
  content: "~";
  color: var(--text-dim);
  margin-right: 0.5rem;
  font-family: var(--font-mono);
}

.install-reqs li a {
  font-weight: 500;
}

.install-cta {
  text-align: center;
  margin-top: 2.5rem;
}

/* ========================================
   Ecosystem
   ======================================== */

.ecosystem {
  padding: 6rem 0;
  background: linear-gradient(180deg, var(--bg) 0%, rgba(24, 24, 27, 0.3) 50%, var(--bg) 100%);
}

.eco-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.eco-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s;
}

.eco-card:hover {
  border-color: var(--border-light);
}

.eco-card-featured {
  border-color: rgba(59, 130, 246, 0.3);
}

.eco-card-featured:hover {
  border-color: rgba(59, 130, 246, 0.5);
}

.eco-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.eco-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--accent-glow);
  color: var(--accent);
}

.eco-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.eco-badge-beta {
  color: var(--yellow);
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.25);
}

.eco-badge-new {
  color: var(--green);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.eco-badge-soon {
  color: var(--text-dim);
  background: rgba(113, 113, 122, 0.1);
  border: 1px solid rgba(113, 113, 122, 0.25);
}

.eco-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.eco-card > p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}

.eco-install {
  margin-bottom: 1.5rem;
}

.eco-install h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.625rem;
}

.eco-install ol {
  list-style: none;
  counter-reset: eco-step;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.eco-install li {
  counter-increment: eco-step;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.55;
  padding-left: 1.5rem;
  position: relative;
}

.eco-install li::before {
  content: counter(eco-step) ".";
  position: absolute;
  left: 0;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.eco-btn {
  margin-top: auto;
  text-align: center;
  justify-content: center;
  font-size: 0.8125rem;
  width: 100%;
}

.eco-btn-disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

/* ========================================
   Agent Showcase (main page)
   ======================================== */

.agent-showcase {
  padding: 6rem 0;
}

.agent-showcase-inner {
  max-width: 900px;
  margin: 0 auto;
}

.agent-showcase .section-sub {
  max-width: 640px;
}

.agent-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.agent-mode-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: border-color 0.3s, transform 0.3s;
}

.agent-mode-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.agent-mode-card .mode-label {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.625rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.agent-mode-card .mode-label-work {
  color: var(--accent);
  background: var(--accent-glow);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.agent-mode-card .mode-label-feature {
  color: var(--purple);
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.25);
}

.agent-mode-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.agent-mode-card > p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.agent-mode-card .step-code {
  margin-bottom: 0;
}

.agent-cta {
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

/* Featured feature card */
.feature-card-featured {
  border-color: rgba(59, 130, 246, 0.3);
  background: linear-gradient(135deg, var(--surface) 0%, rgba(59, 130, 246, 0.05) 100%);
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 2rem;
  align-items: start;
}

.feature-card-featured .feature-icon {
  grid-row: 1 / 3;
  width: 56px;
  height: 56px;
}

.feature-card-featured:hover {
  border-color: rgba(59, 130, 246, 0.5);
}

.feature-card-featured h3 {
  align-self: end;
}

.feature-card-featured p {
  grid-column: 2;
}

.feature-card-featured .feature-cta {
  grid-column: 1 / -1;
  margin-top: 0.75rem;
}

.feature-cta a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

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

/* ========================================
   Agent Page
   ======================================== */

.agent-hero {
  position: relative;
  padding: 10rem 0 4rem;
  text-align: center;
  overflow: hidden;
}

.agent-hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.agent-hero .hero-sub {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.workflow-section {
  padding: 5rem 0;
}

.workflow-section:nth-child(even) {
  background: linear-gradient(180deg, var(--bg) 0%, rgba(24, 24, 27, 0.3) 50%, var(--bg) 100%);
}

.workflow-header {
  text-align: center;
  margin-bottom: 3rem;
}

.workflow-header .mode-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.75rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.workflow-header h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.workflow-header p {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  max-width: 560px;
  margin: 0 auto;
}

.workflow-steps {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.workflow-step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.workflow-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.8125rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.workflow-step-number-blue {
  background: var(--accent);
  color: #fff;
}

.workflow-step-number-purple {
  background: var(--purple);
  color: #fff;
}

.workflow-step h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.workflow-step > p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.workflow-step .step-code {
  margin-bottom: 0;
}

.workflow-connector {
  width: 2px;
  height: 24px;
  background: var(--border);
  margin: 0 auto;
}

/* Prompt customization section */
.prompt-section {
  padding: 5rem 0;
}

.prompt-grid {
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.prompt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.prompt-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.prompt-card > p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.prompt-card .step-code {
  margin-bottom: 0;
}

.install-steps {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.install-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.install-step-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.install-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: var(--accent, #3b82f6);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  flex-shrink: 0;
}

.install-step-head h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0;
}

.install-step > p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.install-option {
  margin-top: 1rem;
}

.install-option-label {
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.install-option .step-code {
  margin-bottom: 0;
}

.template-vars {
  max-width: 800px;
  margin: 3rem auto 0;
}

.template-vars h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center;
}

.var-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.var-table th {
  text-align: left;
  padding: 0.75rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--surface-hover);
  border-bottom: 1px solid var(--border);
}

.var-table td {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.var-table tr:last-child td {
  border-bottom: none;
}

.var-table td:first-child {
  font-family: var(--font-mono);
  color: var(--cyan);
  font-size: 0.8125rem;
  white-space: nowrap;
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.back-link:hover {
  color: var(--text);
}

/* ========================================
   Footer
   ======================================== */

.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.footer-name {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}

.footer-meta {
  font-size: 0.8125rem;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

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

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

.footer-credit {
  font-size: 0.8125rem;
  color: var(--text-dim);
}

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

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

/* ========================================
   Responsive
   ======================================== */

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

  .feature-card-featured {
    grid-column: 1 / -1;
  }

  .eco-grid {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .section-title {
    font-size: 1.75rem;
  }

  .section-sub {
    font-size: 1rem;
    margin-bottom: 2.5rem;
  }

  .install-extras {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(9, 9, 11, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0;
  }

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

  .nav-links a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .nav-dropdown {
    border-bottom: 1px solid var(--border);
  }

  .nav-dropdown-toggle {
    padding: 0.75rem 0;
    font-size: 1rem;
    width: 100%;
  }

  .nav-dropdown-menu {
    position: static;
    transform: none;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0 0 0.5rem 1rem;
    min-width: 0;
  }

  .nav-dropdown-menu a {
    padding: 0.5rem 0;
    border-bottom: none;
    font-size: 0.9375rem;
    border-radius: 0;
  }

  .nav-dropdown-menu a:hover {
    background: none;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding: 8rem 0 3rem;
  }

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

  .hero-sub {
    font-size: 1.0625rem;
  }

  .install-cmd {
    font-size: 0.8125rem;
    gap: 0.5rem;
    width: 100%;
  }

  .install-text {
    overflow: hidden;
    text-overflow: ellipsis;
  }

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

  .feature-card {
    padding: 1.5rem;
  }

  .feature-card-featured {
    grid-template-columns: 1fr;
  }

  .feature-card-featured .feature-icon {
    grid-row: auto;
  }

  .feature-card-featured p {
    grid-column: 1;
  }

  .feature-card-featured .feature-cta {
    grid-column: 1;
  }

  .agent-modes {
    grid-template-columns: 1fr;
  }

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

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

  .terminal-body {
    font-size: 0.75rem;
    padding: 1rem;
    height: 240px;
  }

  .step {
    padding: 1.5rem;
  }

  .cmd-name {
    width: 140px;
  }

  .tab-btn {
    font-size: 0.8125rem;
    padding: 0.625rem 0.5rem;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}
