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

:root {
  --bg: #09090b;
  --bg-elevated: #111113;
  --bg-subtle: #18181b;
  --border: #27272a;
  --border-hover: #3f3f46;
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #e64a19;
  --accent-glow: #ff6e40;
  --accent-subtle: rgba(230, 74, 25, 0.12);
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
}

html { scroll-behavior: smooth; }

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

::selection { background: var(--accent); color: white; }

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* -- Utilities -- */
.container { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }
.text-center { text-align: center; }

.grid-pattern {
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 64px 64px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--text) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-accent {
  background: linear-gradient(135deg, var(--accent-glow) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glow {
  box-shadow: 0 0 80px rgba(230,74,25,0.15), 0 0 160px rgba(230,74,25,0.05);
}

/* -- Animations -- */
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

.anim { animation: fade-in-up 0.8s ease-out both; }
.anim-d1 { animation-delay: 0.1s; }
.anim-d2 { animation-delay: 0.2s; }
.anim-d3 { animation-delay: 0.3s; }
.anim-d4 { animation-delay: 0.4s; }
.pulse { animation: pulse 2s cubic-bezier(0.4,0,0.6,1) infinite; }

/* -- Nav -- */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  border-bottom: 1px solid rgba(39,39,42,0.5);
  backdrop-filter: blur(20px);
  background: rgba(9,9,11,0.8);
}
.nav-inner {
  max-width: 72rem; margin: 0 auto; padding: 0 1.5rem;
  height: 4rem; display: flex; align-items: center; justify-content: space-between;
}
.nav-left, .nav-right { display: flex; align-items: center; gap: 1.5rem; }
.nav-logo { display: flex; align-items: center; gap: 0.75rem; }
.nav-logo img:first-child { width: 28px; height: 28px; }
.nav-logo img:last-child { width: 80px; height: 18px; }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a, .nav-right a {
  font-size: 0.875rem; color: var(--text-secondary);
  transition: color 0.2s;
}
.nav-links a:hover, .nav-right a:hover { color: var(--text); }
.nav-icon-link { display: flex; align-items: center; gap: 0.5rem; }
.nav-icon-link svg { width: 1.25rem; height: 1.25rem; }
.nav-right a.btn-nav {
  padding: 0.5rem 1rem; font-size: 0.875rem; font-weight: 500;
  background: var(--text); color: var(--bg); border-radius: 0.5rem;
  transition: opacity 0.2s; border: none;
}
.nav-right a.btn-nav:hover { opacity: 0.9; color: var(--bg); }

/* -- Buttons -- */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; background: var(--accent); color: white;
  font-weight: 500; border-radius: 0.5rem;
  transition: all 0.3s;
}
.btn-primary:hover { background: var(--accent-glow); }
.btn-primary svg { width: 1rem; height: 1rem; transition: transform 0.2s; }
.btn-primary:hover svg { transform: translateX(2px); }

.btn-outline {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--border); color: var(--text-secondary);
  font-weight: 500; border-radius: 0.5rem;
  transition: all 0.3s;
}
.btn-outline:hover { color: var(--text); border-color: var(--border-hover); }
.btn-outline svg { width: 1.25rem; height: 1.25rem; }

/* -- Section -- */
section { padding: 8rem 0; position: relative; }

.section-label {
  color: var(--accent); font-weight: 500; font-size: 0.875rem;
  letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 1rem;
}
.section-title {
  font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; line-height: 1.1;
}
.section-desc {
  margin-top: 1.5rem; font-size: 1.125rem; color: var(--text-secondary);
  max-width: 40rem; line-height: 1.7;
}
.section-desc.centered { margin-left: auto; margin-right: auto; }

/* -- Hero -- */
.hero { padding-top: 8rem; padding-bottom: 6rem; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; }
.hero-glow {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 600px; height: 600px;
  background: rgba(230,74,25,0.05); border-radius: 50%;
  filter: blur(128px);
}
.hero-content { position: relative; max-width: 48rem; margin: 0 auto; text-align: center; }

.badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.375rem 0.75rem; border-radius: 9999px;
  border: 1px solid var(--border); font-size: 0.75rem;
  font-weight: 500; color: var(--text-secondary);
  background: rgba(17,17,19,0.5); backdrop-filter: blur(8px);
  margin-bottom: 2rem;
}
.badge-dot {
  width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.05;
}

.hero-desc {
  margin-top: 2rem; font-size: 1.25rem; color: var(--text-secondary);
  max-width: 36rem; margin-left: auto; margin-right: auto; line-height: 1.6;
}

.hero-buttons {
  margin-top: 2.5rem; display: flex; flex-wrap: wrap;
  align-items: center; justify-content: center; gap: 1rem;
}

/* -- Code Block -- */
.code-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 0.75rem; overflow: hidden;
  text-align: left;
}
.code-header {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem; font-size: 0.8125rem;
  color: var(--text-muted); font-family: var(--font-mono);
  display: flex; align-items: center; justify-content: space-between;
  text-align: left;
}
.code-dots { display: flex; gap: 0.375rem; }
.code-dot { width: 0.75rem; height: 0.75rem; border-radius: 50%; }
.code-dot-r { background: #ff5f57; }
.code-dot-y { background: #febc2e; }
.code-dot-g { background: #28c840; }
.code-body {
  padding: 1.5rem; font-size: 0.875rem; line-height: 1.8;
  overflow-x: auto; font-family: var(--font-mono);
  text-align: left;
}

/* Syntax */
.kw  { color: #ff6e40; }
.str { color: #66bb6a; }
.typ { color: #42a5f5; }
.cmt { color: #546e7a; font-style: italic; }
.prop { color: #ce93d8; }
.attr { color: #ffb74d; }
.num { color: #ffab40; }
.fn  { color: #80cbc4; }

/* -- Feature Cards -- */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}
.feature-card {
  padding: 1.5rem; border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: rgba(17,17,19,0.3);
  transition: all 0.3s;
}
.feature-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-elevated);
  transform: translateY(-2px);
}
.feature-icon {
  width: 2.5rem; height: 2.5rem; border-radius: 0.5rem;
  background: var(--accent-subtle);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); margin-bottom: 1rem;
}
.feature-icon svg { width: 1.5rem; height: 1.5rem; }
.feature-card h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; }

/* -- Before/After -- */
.comparison {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
}
.comparison-label {
  position: absolute; top: -0.75rem; left: 1rem; z-index: 1;
  padding: 0.25rem 0.75rem; border-radius: 9999px;
  font-size: 0.75rem; font-weight: 500;
  background: var(--bg);
}
.comparison-label-muted {
  border: 1px solid var(--border); color: var(--text-muted);
}
.comparison-label-accent {
  border: 1px solid rgba(230,74,25,0.3); color: var(--accent);
  background: rgba(230,74,25,0.1);
}
.before-block { position: relative; }
.before-block .code-block { opacity: 0.6; }
.after-block { position: relative; }

.stats-row {
  margin-top: 3rem;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
}
.stat-card {
  text-align: center; padding: 1rem;
  border-radius: 0.75rem; border: 1px solid var(--border);
  background: rgba(17,17,19,0.3);
}
.stat-label {
  font-size: 0.75rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}
.stat-values { display: flex; align-items: center; justify-content: center; gap: 0.75rem; }
.stat-before { color: var(--text-muted); text-decoration: line-through; font-size: 1.125rem; }
.stat-arrow { color: var(--accent); }
.stat-arrow svg { width: 1rem; height: 1rem; }
.stat-after { color: var(--accent); font-weight: 700; font-size: 1.125rem; }

/* -- Examples Section -- */
.example-tabs {
  display: flex; gap: 0.5rem; margin-bottom: 2rem;
  justify-content: center;
}
.example-tab {
  padding: 0.625rem 1.25rem; border-radius: 0.5rem;
  border: 1px solid var(--border); background: transparent;
  font-family: var(--font-sans); font-size: 0.875rem; font-weight: 500;
  color: var(--text-secondary); cursor: pointer;
  transition: all 0.2s;
}
.example-tab:hover { color: var(--text); border-color: var(--border-hover); }
.example-tab.active {
  color: var(--accent); border-color: var(--accent);
  background: var(--accent-subtle);
}

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

.example-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start;
}

.example-info h3 {
  font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem;
}
.example-info p {
  font-size: 1rem; color: var(--text-secondary); line-height: 1.7;
  margin-bottom: 1.5rem;
}
.example-run { margin-top: 1rem; }

.example-note {
  margin-top: 1.5rem; padding: 1rem 1.5rem;
  border-radius: 0.75rem; border: 1px solid var(--border);
  background: rgba(17,17,19,0.3);
}
.example-note p {
  font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6;
}

/* -- Keywords Interactive -- */
.keywords-layout {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start;
}
.keywords-cloud {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 2rem;
}
.keyword-tag {
  padding: 0.5rem 1rem; border-radius: 0.5rem;
  border: 1px solid var(--border); background: rgba(17,17,19,0.5);
  font-family: var(--font-mono); font-size: 0.875rem;
  color: var(--text-secondary); cursor: pointer;
  transition: all 0.2s; user-select: none;
}
.keyword-tag:hover { color: var(--accent); border-color: rgba(230,74,25,0.3); }
.keyword-tag.active {
  color: var(--accent); border-color: var(--accent);
  background: var(--accent-subtle);
}

.terminal {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 0.75rem; overflow: hidden;
  position: sticky; top: 6rem;
}
.terminal-header {
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.terminal-title {
  font-family: var(--font-mono); font-size: 0.8125rem; color: var(--text-muted);
}
.terminal-body {
  padding: 1.5rem; min-height: 320px;
  font-family: var(--font-mono); font-size: 0.875rem;
  text-align: left;
}
.terminal-prompt { color: var(--text-muted); }
.terminal-cursor {
  display: inline-block; width: 0.5rem; height: 1.1rem;
  background: var(--accent); vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

.terminal-keyword { color: var(--accent-glow); font-weight: 600; font-size: 1rem; }
.terminal-desc { color: var(--text-secondary); margin-top: 0.75rem; line-height: 1.7; }
.terminal-example {
  margin-top: 1.25rem; padding: 1rem;
  background: var(--bg); border-radius: 0.5rem;
  border: 1px solid var(--border);
  line-height: 1.8;
}

/* -- Comparison Table -- */
.table-wrapper {
  overflow-x: auto;
  border-radius: 0.75rem; border: 1px solid var(--border);
  background: rgba(17,17,19,0.3);
}
.compare-table {
  width: 100%; border-collapse: collapse;
  font-size: 0.875rem;
}
.compare-table th,
.compare-table td {
  padding: 1rem 1.25rem; text-align: left;
  border-bottom: 1px solid var(--border);
}
.compare-table thead th {
  background: var(--bg-subtle); font-weight: 600;
  color: var(--text-secondary); font-size: 0.8125rem;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-table tbody tr:hover { background: rgba(255,255,255,0.02); }
.compare-label { color: var(--text-secondary); font-weight: 500; }
.compare-highlight {
  color: var(--accent); font-weight: 600;
  background: rgba(230,74,25,0.05);
}
.compare-table thead th.compare-highlight {
  color: var(--accent); background: rgba(230,74,25,0.08);
}

/* -- Philosophy -- */
.philosophy-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start;
}
.philosophy-quote {
  margin-top: 2rem; padding: 1.5rem; border-radius: 0.75rem;
  border: 1px solid var(--border); background: rgba(17,17,19,0.3);
  font-family: var(--font-mono); font-size: 0.875rem;
  color: var(--text-secondary); line-height: 1.7;
}
.quote-mark { color: var(--accent); }

.principles-list {}
.principle {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1rem 0; border-bottom: 1px solid rgba(39,39,42,0.5);
  transition: color 0.2s;
}
.principle:hover .principle-text { color: var(--text); }
.principle-num {
  color: var(--accent); font-family: var(--font-mono);
  font-size: 0.875rem; opacity: 0.5; flex-shrink: 0;
  transition: opacity 0.2s;
}
.principle:hover .principle-num { opacity: 1; }
.principle-text {
  color: var(--text-secondary); font-size: 0.875rem; line-height: 1.6;
  transition: color 0.2s;
}

/* -- Getting Started Steps -- */
.steps-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
}
.step-card { text-align: center; }
.step-number {
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--accent-subtle); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem;
  margin: 0 auto 1rem;
  border: 1px solid rgba(230,74,25,0.3);
}
.step-card h3 {
  font-size: 1.125rem; font-weight: 600; margin-bottom: 1rem;
}

/* -- CLI Grid -- */
.cli-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
.cli-card {
  padding: 1.25rem; border-radius: 0.75rem;
  border: 1px solid var(--border); background: rgba(17,17,19,0.3);
  transition: all 0.2s;
}
.cli-card:hover {
  border-color: var(--border-hover); background: var(--bg-elevated);
}
.cli-cmd {
  font-family: var(--font-mono); font-size: 0.875rem;
  color: var(--accent); display: block; margin-bottom: 0.5rem;
}
.cli-card p {
  font-size: 0.8125rem; color: var(--text-secondary); line-height: 1.5;
}

/* -- Deploy Grid -- */
.deploy-grid {
  display: flex; gap: 1.5rem;
}

/* -- CTA -- */
.cta-box {
  border-radius: 1rem; border: 1px solid var(--border);
  background: rgba(17,17,19,0.3); padding: 4rem;
  text-align: center; overflow: hidden; position: relative;
}
.cta-glow {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 400px; height: 200px;
  background: rgba(230,74,25,0.1); border-radius: 50%;
  filter: blur(96px);
}
.cta-content { position: relative; }
.install-cmd {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: 0.875rem;
  margin-top: 2.5rem;
}
.install-cmd .code-block { display: inline-flex; }
.install-cmd .code-body { padding: 0.75rem 1.25rem; display: flex; gap: 0.75rem; }
.install-dollar { color: var(--text-muted); }

.cta-links {
  margin-top: 2rem; display: flex; align-items: center;
  justify-content: center; gap: 1.5rem;
}
.cta-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; color: var(--text-secondary);
  transition: color 0.2s;
}
.cta-link:hover { color: var(--text); }
.cta-link svg { width: 1.25rem; height: 1.25rem; }

/* -- Footer -- */
footer {
  border-top: 1px solid var(--border); padding: 3rem 0;
}
.footer-inner {
  max-width: 72rem; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-left { display: flex; align-items: center; gap: 0.75rem; }
.footer-left img { width: 20px; height: 20px; opacity: 0.5; }
.footer-left span { font-size: 0.875rem; color: var(--text-muted); }
.footer-links { display: flex; align-items: center; gap: 1.5rem; }
.footer-links a {
  font-size: 0.875rem; color: var(--text-muted); transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }

/* -- Responsive -- */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .keywords-layout { grid-template-columns: 1fr; }
  .terminal { position: static; }
  .comparison { grid-template-columns: 1fr; }
  .philosophy-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .cli-grid { grid-template-columns: repeat(2, 1fr); }
  .deploy-grid { flex-direction: column; }
  .example-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  section { padding: 4rem 0; }
  .features-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .cli-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.25rem; }
  .hero-buttons { flex-direction: column; }
  .nav-links { display: none; }
  .footer-inner { flex-direction: column; gap: 1.5rem; }
  .cta-box { padding: 2.5rem 1.5rem; }
  .example-tabs { flex-wrap: wrap; }
}
